Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Daniele Futtorovic Newsgroups: comp.lang.java.programmer Subject: Re: Thread queue Date: Wed, 27 Feb 2013 13:00:21 +0100 Organization: A noiseless patient Spider Lines: 15 Message-ID: References: <41750994-c932-4206-b1e6-b0f21dea16d5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 27 Feb 2013 11:59:11 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="8462e3e6d8c28bca67d021b2eef0e779"; logging-data="24084"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iSrN+mGjGuKZM9NhOlHnm" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: <41750994-c932-4206-b1e6-b0f21dea16d5@googlegroups.com> Cancel-Lock: sha1:A5xybuUFyfyK7auektDw+yA1spc= Xref: csiph.com comp.lang.java.programmer:22571 On 26/02/2013 16:51, bob smith allegedly wrote: > Is there some kind of system in Java where you can put Thread objects on a queue and they get executed in sequence? > > Thanks. You're confusing things here. Threads are not things that get executed (at least not as far as the JVM is concerned). Threads are the things that *execute*. *Runnable*s or *Callable*s are the things that get executed. Yes, you can certainly put Runnables or Callables in a queue and have them be executed sequentially. As mentioned by someone else in this thread, the java.util.concurrent package is the place you'll want to look. -- DF.