Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29262

Re: thread pool

From Philipp Kraus <philipp.kraus@flashpixx.de>
Newsgroups comp.lang.java.programmer
Subject Re: thread pool
Date 2014-07-24 09:55 +0200
Organization Clausthal University of Technology
Message-ID <lqqe64$mq8$1@ariadne.rz.tu-clausthal.de> (permalink)
References (4 earlier) <lqmk8d$e3m$1@dont-email.me> <lqnjln$2l6e$1@ariadne.rz.tu-clausthal.de> <lqo61b$dao$1@dont-email.me> <lqof0k$2res$1@ariadne.rz.tu-clausthal.de> <lqol2t$tba$1@dont-email.me>

Show all headers | View raw


On 2014-07-23 15:41:13 +0000, Eric Sosman said:

> On 7/23/2014 9:57 AM, Philipp Kraus wrote:
>> On 2014-07-23 11:24:24 +0000, Eric Sosman said:
>> 
>> 
>> On 7/23/2014 2:11 AM, Philipp Kraus wrote:
>> 
>> [...]
>> 
>> It seems, that the CountDownLatch does not work as expected. Any idea?
>> 
>> 
>> Time for an SSCCE, I think. <http://sscce.org/>
>> 
>> 
>> see the link https://github.com/flashpixx/threadtest (working example)
> 
>      One thing I noticed, though I haven't analyzed things carefully
> enough to be sure: You initialize the CountDownLatch with a count
> of five, but six different threads call await() on it.  Surely
> that can't be right, can it?

5 Threads are running (i=0 to i < 5), so the threads are [0..4] = 5 and 
the await ist
called from outside (another thread). If you increment the number of 
the CountDownLatch
the system will hang up

Phil

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

thread pool Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-07-22 15:00 +0200
  Re: thread pool Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-07-22 09:11 -0400
    Re: thread pool Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-07-22 16:32 +0200
    Re: thread pool Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-07-22 21:38 +0200
      Re: thread pool Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-07-22 16:29 -0400
        Re: thread pool Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-07-22 23:01 +0200
          Re: thread pool Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-07-22 17:14 -0400
            Re: thread pool Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-07-23 08:11 +0200
              Re: thread pool Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-07-23 07:24 -0400
                Re: thread pool Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-07-23 15:57 +0200
                Re: thread pool Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-07-23 11:41 -0400
                Re: thread pool Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-07-24 09:55 +0200
                Re: thread pool Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-07-24 08:39 -0400
  Re: thread pool Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2014-07-24 20:50 -0700

csiph-web