Skip to content

Thread-safe mocks #22

@bossmc

Description

@bossmc

Currently the generated mock objects all share access to the internals, though an Rc<RefCell<Internals>> so aren't Sync or Send. It also seems (from a cursory effort to change that to Arc<Mutex<...>>) that various of the Matcher/Expectation/Call objects/traits aren't (guaranteed) thread-safe.

With futures/tokio becoming all the rage, it would be really useful to be able to generate mocks that can be passed through future chains, but this requires Send/Sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions