mockers
mockers copied to clipboard
Thread-safe mocks
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
.