This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: :synchronized in define-simple-class


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]