I think it uses intrinsic locks, which are always non-fair. You can instantiate fair locks (what you are asking for) with the implementations in this package: http://java.sun.com/javase/6/docs/api/java/util/concurrent/locks/package-summary.html But that requires you use lock.lock() and lock.unlock() directly in a try-finally structure.
On Thu, Oct 15, 2009 at 4:26 PM, Garth Sheldon-Coulson <[email protected]> wrote: > Hi All, > > If multiple threads are competing for the monitor of an object using > (locking obj ... ), is it a strict queue for the monitor (first in, first > lock) similar to send and send-off? Or are there other considerations? > > I would probably know this if I knew more about Java sync, but quick > web/groups searches don't give a clear answer. Sorry for the basic question. > > Garth > > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
