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

Console Runner: Fix Race Condition #514

Closed
wants to merge 1 commit into from

Conversation

jugglinmike
Copy link
Contributor

When spawning threads from within a for loop, the original
parallelization implementation relied on a function closure to access
each TestCase instance. Due to the concurrent and non-deterministic
nature of thread processing, the value of this reference at execution
time was unstable.

Explicitly specify the TestCase instance to the Thread constructor,
ensuring that each thread is run with the intended value, regardless of
execution order.

Resolves gh-512.

When spawning threads from within a `for` loop, the original
parallelization implementation relied on a function closure to access
each `TestCase` instance.  Due to the concurrent and non-deterministic
nature of thread processing, the value of this reference at execution
time was unstable.

Explicitly specify the `TestCase` instance to the `Thread` constructor,
ensuring that each thread is run with the intended value, regardless of
execution order.
@goyakin
Copy link
Member

goyakin commented Feb 25, 2016

Closing in favor of #513

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.

2 participants