Yeah, but I'm missing conditions (with ability to spawn multiple instances) and the use wait and signal.
It would be nice to have: (some where in code (locking [my-lock c1 c2] (wait c1) .... bla bla bla. ... (signal c2))) (in other place (locking [my-lock c1 c2] (signal c1) .... bla bla bla..... (wiat c2))) The my-lock is a monitor in which context c1, c2 conditions are created. The c1, c2 would be resolved as context identifiers of conditions for my-lock (all reasources if not exist already are created once, then referenced). I will try to implement it. Writing in Clojure is much funnier than in Java. Anyone can also join to create such behaviour. On 15 May 2010 08:58, ka <sancha...@gmail.com> wrote: > @Michael, > There is already a monitor mechanism available in Clojure via the > 'locking' macro or more primitive monitor-enter, monitor-exit. So in > your case all you have to implement is the blocking behavior, I'm not > sure if it can be already done somehow using just Clojure elements. > The above code you gave might just as well be written in Java? > > @Meikel > Hmm, thanks for the explanation, I get it now. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com<clojure%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en