Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Knute Johnson Newsgroups: comp.lang.java.programmer Subject: Re: Threads, waiting for last one to finish Date: Mon, 14 Jan 2013 08:58:09 -0800 Organization: A noiseless patient Spider Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 14 Jan 2013 16:58:10 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="9b3fcb0d22708969e4dc99e7aa0ef1f9"; logging-data="5957"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4SxcpGfT17xtIOSL337F5" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: Cancel-Lock: sha1:P6s73Qx8w77Q+R8/nNPaNV4yJuc= Xref: csiph.com comp.lang.java.programmer:21399 On 1/13/2013 10:38 AM, Robert Klemme wrote: > On 12.01.2013 06:19, Knute Johnson wrote: >> On 1/11/2013 1:56 PM, Roedy Green wrote: >>> I have 25 threads that start at once. I need to wait until the last >>> one completes. Is there a better way to handle that than using a >>> ThreadPoolExecutor which seems overkill. >>> >> >> You can always join() them. > > I am surprised that this got just one mention so far. Me too :-). -- Knute Johnson