This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: :synchronized in define-simple-class
- From: Per Bothner <per at bothner dot com>
- To: Yaroslav Kavenchuk <kavenchuk at jenty dot by>
- Cc: kawa at sourceware dot org
- Date: Wed, 09 Jan 2008 09:48:22 -0800
- Subject: Re: :synchronized in define-simple-class
- References: <4784BE0E.5070401@jenty.by>
Yaroslav Kavenchuk wrote:
It is possible to declare method as |"synchronized"?
Yes and no. You can get the same effect by wrapping its
body by a synchronized expression:
(module-static #t)
(define-simple-class <Bar> ()
;; non-static method
((foo) :: void
(synchronized (this)
(synchronized-block)))
;; static method
((baz) allocation: 'static :: void
;; this only works with SVN Kawa:
(synchronized <Bar>
(synchronized-block))))
See:
http://www.gnu.org/software/kawa/Miscellaneous.html#id2587912
--
--Per Bothner
per@bothner.com http://per.bothner.com/