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

Make Interceptor more thread-safe #392

Merged
merged 1 commit into from
Jun 27, 2017

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Jun 22, 2017

Several methods in Interceptor currently read and modify a private dictionary without any synchronization or locking, which means that if someone tries to perform several setups concurrently on the same mock, they might run into a some multithreading-related exception every now and then.

Performing concurrent setups on the same mock is probably not a very frequent use case, but it can't hurt to make Moq more thread-safe.

This should take care of #326.

Several methods in `Interceptor` currently read and modify a private
dictionary without any synchronization or locking, which means that if
someone tries to perform several setups concurrently on the same mock,
they might run into a some multithreading-related exception every now
and then.
@stakx stakx force-pushed the interceptor-thread-safety branch from 4f3382f to 970981d Compare June 27, 2017 05:17
@stakx stakx merged commit dd907ac into devlooped:develop Jun 27, 2017
@stakx stakx deleted the interceptor-thread-safety branch June 27, 2017 05:35
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

Successfully merging this pull request may close these issues.

None yet

1 participant