Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #10390
| From | Eric Sosman <esosman@ieee-dot-org.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Thread question |
| Date | 2011-11-30 21:04 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <jb6ncf$vae$1@dont-email.me> (permalink) |
| References | <i9tbd7ppgalucct4i2t2agj9hldjumnmk4@4ax.com> <jb57hc$v6g$1@dont-email.me> <jb5b6d$kbn$1@dont-email.me> |
On 11/30/2011 8:30 AM, markspace wrote:
> On 11/30/2011 4:28 AM, Eric Sosman wrote:
>
>> On 11/30/2011 4:31 AM, Roedy Green wrote:
>>> 2. some way of knowing when the last one completed.
>
>> A simple counter will do it.
>
>
> I'd recommend the simple built-in method "ExecutorService::shutdown()".
> It waits until all tasks have completed.
ITYM awaitTermination(), a method I hadn't noticed but which
does as you say *and* has a useful timeout. shutdown(), however,
does not wait: It just "initiates an orderly shutdown" and returns
with the shutdown still (potentially) in progress.
--
Eric Sosman
esosman@ieee-dot-org.invalid
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 01:31 -0800
Re: Thread question Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-11-30 01:48 -0800
Re: Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 02:32 -0800
Re: Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 02:48 -0800
Re: Thread question Patricia Shanahan <pats@acm.org> - 2011-11-30 03:11 -0800
Re: Thread question Paul Cager <paul.cager@googlemail.com> - 2011-11-30 07:10 -0800
Re: Thread question Patricia Shanahan <pats@acm.org> - 2011-11-30 09:34 -0800
Re: Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 06:10 -0800
Re: Thread question markspace <-@.> - 2011-11-30 06:13 -0800
Re: Thread question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-30 11:53 -0800
Re: Thread question Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-30 07:28 -0500
Re: Thread question markspace <-@.> - 2011-11-30 05:30 -0800
Re: Thread question Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-30 21:04 -0500
Re: Thread question markspace <-@.> - 2011-11-30 18:28 -0800
Re: Thread question markspace <-@.> - 2011-11-30 05:50 -0800
Re: Thread question markspace <-@.> - 2011-11-30 06:04 -0800
Re: Thread question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-30 11:48 -0800
Re: Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 13:23 -0800
csiph-web