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

Fixing Bug with Multi Threaded Random Access #61

Merged
merged 1 commit into from
Jan 23, 2016

Conversation

blmeyers
Copy link
Contributor

Adding test to verify multi threaded random support, and adjusting implementation to use ThreadStatic for NET3X, ThreadLocal for anything else. Fixes bug with getting null Random instance when accessing on the second created thread, due to ThreadLocal variable only being instantiated once in the static constructor instead of once per thread.

If support for NET3X is ever deprecated the ThreadStatic implementation can be completely removed in favor of the ThreadLocal implementation.
#60

…plementation to use ThreadStatic for NET3X, ThreadLocal for anything else. Fixes bug with getting null Random instance when accessing on the second created thread, due to ThreadLocal variable only being instantiated once in the static constructor instead of once per thread.
@Tynamix Tynamix merged commit 2c62b06 into Tynamix:master Jan 23, 2016
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

2 participants