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/... 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/...