[armedbear-devel] [PATCH] Support for SYNCHRONIZED blocks (and company)

Alessio Stalla alessiostalla at gmail.com
Thu Jul 9 00:41:27 UTC 2009

On Wed, Jul 8, 2009 at 11:50 PM, Erik Huelsmann<ehuels at 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.

> On Wed, Jul 8, 2009 at 11:49 PM, Erik Huelsmann<ehuels at 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 at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel

More information about the armedbear-devel mailing list