Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.szaf.org!news.gnuher.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Philipp Kraus Newsgroups: comp.lang.java.programmer Subject: Re: thread pool with waiting option Date: Thu, 10 Apr 2014 18:06:04 +0200 Organization: 1&1 Internet AG Lines: 35 Message-ID: References: NNTP-Posting-Host: p4fc609ae.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: online.de 1397145964 3788 79.198.9.174 (10 Apr 2014 16:06:04 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Thu, 10 Apr 2014 16:06:04 +0000 (UTC) User-Agent: Unison/2.1.10 Xref: csiph.com comp.lang.java.programmer:28019 On 2014-04-10 15:36:07 +0000, markspace said: > What's your goal here? What are you actually trying to accomplish or simulate? > > It looks to me like you want something similar to fork/join, but your > question only has a single implementation and no other clues as to what > is going on. this is a step-based simulation and I would like to create a pause / wait on a step. > This appears to run each task sequentially. Not much "multi-threading" > happening. 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 > ?? Once a thread is finished, you want to run it again? I don't think > this will work like you expect. I have got a thread pool and all simulation objects must be processed by the threads in the pool and if all objects have been processed, there must be a short wait, after that the algorithms starts again. 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. Thx Phil