[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.java.programmer

Re: future run unlimited

Eric Sosman

6/11/2016 12:22:00 PM

On 6/10/2016 3:49 PM, Philipp Kraus wrote:
> Am Freitag, 10. Juni 2016 17:48:52 UTC+2 schrieb Eric Sosman:
>> [...]
>> If that's the goal, I think ExecutorCompletionService could help.
>> You would submit all N tasks to the ECS (a one-time "batch" operation),
>> take() each task as it finishes, consume its result, and re-submit.
>
> Yes, I would like to do that, but is there an existing structure
> for the submit - resubmit structure or should I write my own structure?
> Is there an ExecutorService which gets only the Callable list (because it is in
> my case an unmodifiable list) and do the whole wort for me?

I don't know of one.

>[...]
> I have written an global flag, but is there a better way for doing the shutdown
> process?

I cannot answer because I do not know how you measure "better."

--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM