Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: markspace Newsgroups: comp.lang.java.programmer Subject: Re: thread pool with waiting option Date: Thu, 10 Apr 2014 09:22:33 -0700 Organization: A noiseless patient Spider Lines: 24 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 10 Apr 2014 16:22:43 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="9358cda03e1e0dfd3c4b757daa608707"; logging-data="25552"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/icfPVy1nOlUmkEz1ian4c2II4p85+n6I=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: Cancel-Lock: sha1:q0U7AqcWuNHqSnIl2bg0SjjPYMo= Xref: csiph.com comp.lang.java.programmer:28020 On 4/10/2014 9:06 AM, Philipp Kraus wrote: > > this is a step-based simulation and I would like to create a pause / > wait on a step. I really can't help you at all if I don't know something about the problem. What *precisely* are you trying to simulate? > Each object in the simulation can run independed from the other object. > I have got a large > number of objects which must be handled by the thread pool This describes every single concurrency problem in existence. So what? > > So on each simulation step all objects must be processed, than a barrier > must wait for all working threads, > if all thread reaches the barrier, the next step begins. Well, you just said barrier. Have you looked at those?