Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34590
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2016-06-10 06:30 -0700 |
| Message-ID | <2b896a25-e53e-4398-b423-fca4d040c3f9@googlegroups.com> (permalink) |
| Subject | future run unlimited |
| From | Philipp Kraus <philipp.kraus.flashpixx@gmail.com> |
Hello,
I would like to build an unlimited working process with an executor new-work-stealing executor.
I have a stream of callable objects and I submit them to the executor, and I will get on the submit call a future of my input, but after the object is done, I will run it again within the pool. In some pseudo-code illustrating:
mycallablestream
.map( i-> pool.submit(i))
.filter( i -> i is done)
.foreach( i -> mycallable.put(i) )
How can I do this with the execution service and how I can shutdown the pool in a correct way if my user creates an event for closing (from UI)?
Hope it is clear for understanding
Thanks for help
Phil
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
future run unlimited Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-06-10 06:30 -0700
Re: future run unlimited Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-10 10:17 -0400
Re: future run unlimited Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-06-10 07:34 -0700
Re: future run unlimited Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-10 11:48 -0400
Re: future run unlimited Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-06-10 12:49 -0700
Re: future run unlimited Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-11 08:22 -0400
csiph-web