Hi,

I would like to schedule updates to a state machine (eg. move each second 
to a new state and do something) and I will have potentially 10.000+ of 
these state machines. Ideally I would like to do something like this:

(defn my-func [state]
  (let [new-state (do-something state)]
    (schedule-in-1sec my-func new-state)))

I can't really use (Thread/sleep 1000) as that would mean I would have a as 
many threads as I have state machines, which would only work for a small 
number of state machines/threads.

Any ides how best to achieve this in Clojure? I already had a look at the 
various scheduling libraries (at-at, cronj and Quartzite), but from what I 
understand they don't support this behaviour, but please correct me if I am 
wrong.

Thomas

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to