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.
Currently the generated mock objects all share access to the internals, though an
Rc<RefCell<Internals>>so aren'tSyncorSend. It also seems (from a cursory effort to change that toArc<Mutex<...>>) that various of theMatcher/Expectation/Callobjects/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.