[Biojava-dev] [Bug 2164] Restriction Mapper - Thread (or dual core cpu) problem

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Jan 21 09:47:37 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2164





------- Comment #11 from andyyatz at gmail.com  2008-01-21 04:47 EST -------
If we're looking at Java5+ features here then maybe something like:

http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/locks/ReadWriteLock.html

This is a far superior solution to synchronized blocks as they offer a
difference between reading something & altering it. The blocks can last for as
little or as long as required with us only needing to make sure that we perform
the code in a try {} finally {} block to ensure we do not continually lock out
a resource.

(In reply to comment #10)
> As suggested I have added back the synchronized blockas as they are certainly
> needed even though this doesn't fully solve the problem.  Interestingly on
> windows vista on a dual core CPU a race condition develops and never seems to
> resolve (not even a stack trace)!  Notably this was on a short sequence not one
> likely to be a PackedSymbolList as mentioned below.
> 
> I wonder if there is a problem with the SimpleThreadPool. Maybe a switch to a
> normal Java thread pool might be better?
> 
> 


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the biojava-dev mailing list