Skip to content

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

Merged
nlevitt merged 1 commit intointernetarchive:masterfrom
travisfw:master
May 31, 2012
Merged

ScriptedDecideRule#getEngine() rewrite for better synchronization and thread local mgmt#10
nlevitt merged 1 commit intointernetarchive:masterfrom
travisfw:master

Conversation

@travisfw
Copy link
Copy Markdown

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