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

ScriptedDecideRule#getEngine() rewrite for better synchronization and thread local mgmt #10

Merged
merged 1 commit into from
May 31, 2012

Conversation

travisfw
Copy link

Previously the whole method was synchronized even if threadlocals
were used (which are thread safe). And previously the sharedEngine
was set and returned only when it /was not/ needed ie when
getIsolateThreads() returned true.

Now getEngine does what it says it does.

This bug likely would be difficult to notice, as using thread local threadEngine instead of the sharedEngine would not cause major exceptions, and the class has not seen extensive use inside the Internet Archive to my knowledge anyhow.

Previously the whole method was synchronized even if threadlocals
were used (which are thread safe). And previously the sharedEngine
was set and returned only when it /was not/ needed ie when
getIsolateThreads() returned true.

Now getEngine does what it says it does.
@nlevitt nlevitt merged commit 392a4b3 into internetarchive:master May 31, 2012
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