Hi!

Let me tell you my problem:

I have atom, which is some structure (my hashmap).

Now periodically some data are assoc to my hashmap with swap!
(producer).

Also there is a consumer of these added data, which takes the data (in
fact it just re-organize my hashmap, to mark the fact that something
was borrowed/taken).

Now I would like to make, that consumer blocks when it notices that
there is no data waiting in my hashmap until producer assoc new data
in hashmap.

Produced data are assoc because they can be "produced" many times, so
linked blocking queue is not allowed as synchronization mechanism.

I can't find any way to do it in Clojure. In Java I would just do it
with HashMap (not HashSet because I also associate some data with
produced data) and block of synchronize, wait and notify. Any help
there?

-- 
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

Reply via email to