On Wed, Jul 8, 2009 at 11:50 PM, Erik Huelsmannehuels@gmail.com wrote:
The patch...
One thing to consider: why not call javaInstance() on LispObjects to obtain the lock object, instead of using the LispObject itself?
Pros: JavaObjects would be unwrapped and thus it could be possible to share a lock with Java code. javaInstance() returns the LispObject itself in most other cases.
Cons: "most" other cases is not good enough. E.g. for Fixnums, it is possible if I understand it correctly that two subsequent calls to javaInstance() will yield two different Integer instances and this is Very Bad.
Maybe instead of always calling javaInstance(), you could test for JavaObjects and call it only in that case. Thoughts?
On Wed, Jul 8, 2009 at 11:49 PM, Erik Huelsmannehuels@gmail.com wrote:
Based on discussion earlier this week, I'd like the following patch to get committed to our trunk.
It introduces a new block statement
SYNCHRONIZED-ON <object> body
and next to that a number of functions:
object-wait <object> &optional timeout object-notify <object> object-notify-all <object>
So, what's the verdict?
Anyway, I plan on including some simple test cases, but ofcourse, if someone feels like doing so, please feel free!
Bye,
Erik.
armedbear-devel mailing list armedbear-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel