Re: How to do aynchrounous producer/consumer

2012-06-17 Thread Warren Lynn
Thank you all for the suggestions. I decided to use Java as lamina seems an overkill for me and I may lose some control over things I want to have. I was wishing for a pure Clojure solution, but a wrapping layer over the Java works fine. On Sunday, June 17, 2012 4:43:17 AM UTC-4, Jeff Rose wr

How to do aynchrounous producer/consumer

2012-06-17 Thread Jeff Rose
Java has queues that will do just what you want, as well as thread pools to process the jobs. It's reasonable and idiomatic to use this stuff from Clojure. http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html -Jeff -- You received this message becaus

How to do aynchrounous producer/consumer

2012-06-17 Thread Jeff Rose
-- 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 clojur

Re: How to do aynchrounous producer/consumer

2012-06-16 Thread Zhitong He
try lamina? https://github.com/ztellman/lamina/ On Sat, Jun 16, 2012 at 9:44 AM, Warren Lynn wrote: > > What I want to do is something I probably have done dozens of times in C++: > two threads, one thread putting items in a queue, another taking it out > (FIFO). How to do it in Clojure? I am at

Re: How to do aynchrounous producer/consumer

2012-06-16 Thread Warren Lynn
On Saturday, June 16, 2012 12:47:03 AM UTC-4, Alan Malloy wrote: > > (map consume (seque (produce-lazily))) > > Thank you! This is not exactly what I want (my input data is pushed from an external Java framework), but I was not aware there is a "seque" function, which might be useful for my oth

Re: How to do aynchrounous producer/consumer

2012-06-15 Thread Alan Malloy
(map consume (seque (produce-lazily))) On Friday, June 15, 2012 6:44:39 PM UTC-7, Warren Lynn wrote: > > > What I want to do is something I probably have done dozens of times in > C++: two threads, one thread putting items in a queue, another taking it > out (FIFO). How to do it in Clojure? I am

How to do aynchrounous producer/consumer

2012-06-15 Thread Warren Lynn
What I want to do is something I probably have done dozens of times in C++: two threads, one thread putting items in a queue, another taking it out (FIFO). How to do it in Clojure? I am at a loss. I thought about a few options: 1. "watches", but it cannot change the queue itself (can only watc