Re: How does Executors/newScheduledThreadPool know how or where to parallelize work?

2019-01-02 Thread Orestis Markou
If you call future, you will be using the future threadpool which is unbounded. If you know there’s always going to be a small amount of tasks in-flight, you can safely just use future to parallelize your work, and the scheduled executor to trigger trigger the work periodically. Have a look at

Re: How does Executors/newScheduledThreadPool know how or where to parallelize work?

2019-01-02 Thread Matching Socks
You are right, this is not a Clojure question. I suppose your scheduled task could put a bunch of tasks on a queue and a thread-pool executor could work the queue in multiple threads. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: How does Executors/newScheduledThreadPool know how or where to parallelize work?

2019-01-02 Thread Justin Smith
A ScheduledThreadPool doesn't parallelize or partition your work, it schedules tasks and keeps a pool of Thread objects it can reuse for that purpose. If you need a job to be broken into smaller pieces, executed on a schedule, you'll need to implement some sort of coordination. There's some prior a

How does Executors/newScheduledThreadPool know how or where to parallelize work?

2019-01-02 Thread lawrence . krubner
I guess this is more of a JVM question than a Clojure question, unless Clojure exerts any special magic here. I'm open to a more Clojure approach than what I have now. Someone suggested I use Executors/newScheduledThreadPool for some recurring work, so I set it up like this: (def scheduler-a

Re: Reify (run vs cloverage) (single node vs cluster)

2019-01-02 Thread cloje
Thanks Justin, I changed to deftype and it seems to be working fine on Cloverage on my local machine. I'm gonna try it on cluster mode and will update if that worked or not. Happy new year! :) On Monday, December 31, 2018 at 9:36:07 PM UTC-6, Justin Smith wrote: > > Just a hunch, but many cl

Re: [ANN] CIDER 0.19

2019-01-02 Thread Tim Visher
Thanks to you, Bozho ( ;) ) , and all the other contributors for your consistent hard work on CIDER! :) It's made my life and the life of my team so much better. On Tue, Jan 1, 2019 at 10:39 AM Bozhidar Batsov wrote: > Btw, I also wrote a short blog post on th