Re: partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Jacek Grzebyta
Finally I will add atomically changed flag `isFinished`. And separate throw to close if the flag is true. On 6 December 2017 at 13:30, Jacek Grzebyta wrote: > So I found how to manage all sub-*-methods ( finish) but still I do not know where should I put close!. If I do at the > end of the m

Re: partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Jacek Grzebyta
So I found how to manage all sub-*-methods ( wrote: > Sorry. I put close at he and of the main method but I afraid the main > thread will reach close method before all the data will be put to the queue. > Is any way to check a state of the queue? If I handle channels returned by > all *-sub-me

Re: partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Jacek Grzebyta
Sorry. I put close at he and of the main method but I afraid the main thread will reach close method before all the data will be put to the queue. Is any way to check a state of the queue? If I handle channels returned by all *-sub-methods with go inside I could check state if was finished? Regard

Re: partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Jacek Grzebyta
Thanks a lot. I found you changed the finish slightly - you close q within go body. Where should I put close! in case if I load a channel in many places within several methods? I afraid the go body is done E.g.: (defn main-method [db-api] (let [main-queue (chan 2) ] (sink-method main-q

Re: partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Ray Miller
On 6 December 2017 at 11:23, Jacek Grzebyta wrote: > > I have to populate a triple store with a big number of data (~38k records > x 12) and there is a deadly narrow bottleneck - IO operations speed. To fix > it I did: > 1. To avoid threads overflow I put all compute results into channel. >