For kicks, I made an implementation* using agents: http://gist.github.com/119946
I think that you may not want to use the STM so much and instead figure out a different approach to sending the token around the ring. *it may be a bit liberal in its interpretation of the rules... didn't read them that carefully. On Fri, May 29, 2009 at 2:32 PM, Alvaro Vilanova Vidal <alv...@gmail.com> wrote: > > Hi everyone, > I am a newbie in clojure world, so I have some newbie's questions :) To > learn about clojure, I am trying to do the thread ring problem of clgb in > clojure. The rules of problem are here, and my attempt here. It seems that > works well, but I can only test it with a small load (5 - 15 threads, 503 is > the target) because it runs extremely slow. I tried to use atoms, hints, and > change the implementation, but always is slower. What am I doing wrong? And, > by the way, why can't I compile the class? > > Thanks a lot. > > > > > -- 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 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 -~----------~----~----~----~------~----~------~--~---