[armedbear-devel] [RFC] Support for 'synchronized' blocks in Lisp code
Ville Voutilainen
ville.voutilainen at gmail.com
Tue Jul 7 13:49:13 UTC 2009
On Tue, Jul 7, 2009 at 4:30 PM, Erik Huelsmann<ehuels at gmail.com> wrote:
> I propose that we introduce a WITH-EXCLUSIVE-ACCESS form in the EXT
> package, which takes 1 argument (the second value) and a body (the
> third value). The form makes sure that the body is evaluated as if it
> had been called with:
> synchronized (arg1) {
> body-to-evaluate;
> }
> Except that it implements this in Lisp. This way, our Lisp<>Java
> interoperability would increase. It would also be an efficient way to
> guarantee exclusive access when modifying a cross-thread shared
> resource (such as generic functions).
> Comments?
Sounds good, although WITH-EXCLUSIVE-ACCESS isn't very descriptive to
me, I'd go for WITH-THREAD-LOCK. (not WITH-LOCK, because there are many
kinds of locks). Just my 0.02. ;)
More information about the armedbear-devel
mailing list