Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread-safe mocks #22

Open
bossmc opened this issue Jan 30, 2018 · 0 comments
Open

Thread-safe mocks #22

bossmc opened this issue Jan 30, 2018 · 0 comments

Comments

@bossmc
Copy link

bossmc commented Jan 30, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant