[armedbear-devel] [Updated4] Patch for ABCL against BORDEAUX-THREADS HEAD

Mark Evenson evenson at panix.com
Fri Mar 18 16:09:28 UTC 2011


On 3/18/11 5:01 PM, Ville Voutilainen wrote:
[…]
> If we are implementing posix-style-semantics, we could avoid reinventing that
> wheel on java, and use
> http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/locks/package-summary.html
> which has the posix semantics.

My implementation of BORDEAUX-THREADS *is* using this package for the 
base mutex lock.  The problem for the condition variables is that the 
java.util.concurrent implementation requires that a condition variable 
be [created from the lock it is to be used with][1] which is not a 
requirement for pthreads, so BT:MAKE-CONDITION-VARIABLE doesn't contain 
a reference to the lock that will be used.  I tried one implementation 
strategy that had BT:CONDITION-WAIT call this method the first time it 
is invoked, but that didn't seem to work very well.  If there is 
something clever that I have missed, please help me find it.

[1]: 
http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/locks/ReentrantLock.html#newCondition%28%29


-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."




More information about the armedbear-devel mailing list