[armedbear-devel] [RFC] Support for 'synchronized' blocks in Lisp code

Erik Huelsmann ehuels at gmail.com
Tue Jul 7 13:30:46 UTC 2009


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?

Bye,


Erik.




More information about the armedbear-devel mailing list