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


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

Re: Making one or more threads wait for another to produce a value or fail

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date Thu, 02 Jun 2011 16:43:27 -0500
Date Thu, 02 Jun 2011 14:43:32 -0700
From Patricia Shanahan <pats@acm.org>
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: Making one or more threads wait for another to produce a value or fail
References <alpine.DEB.2.00.1105311443530.28134@urchin.earth.li> <is8u8e$5jn$1@dont-email.me>
In-Reply-To <is8u8e$5jn$1@dont-email.me>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <LPadnbEE6fFinnXQnZ2dnUVZ_v2dnZ2d@earthlink.com> (permalink)
Lines 22
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 70.230.199.144
X-Trace sv3-4UY3XDe9cfstuKNjMSQ6ejePypoPaOJBgFegmWIknfa9+Bu1ZP9vaVIOW6hQSh8eO/vEHoIzmpFiQ2v!M5bdCQzgHbiSdxNz7JBDOtvxdhTf0I7Zf/zMP863+QW84TZjkDS2fG9Xe+eKkO7eMkT3Zm064ZTm!c9ERaHHZZm5XDlpraJX3yOlxILuuk4MPfPk6RnGIzRc1iUs=
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 2221
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4906

Show key headers only | View raw


On 6/2/2011 2:10 PM, markspace wrote:
> On 5/31/2011 7:00 AM, Tom Anderson wrote:
>> The scenario:
>>
>> Penelope is a widow, or at least her husband isn't around any more
>> (she's not sure which; long story). There are 108 suitors who would like
>> to marry her. She hasn't decided which one she'll marry. So, the 108
>> suitors are sitting about waiting for her to decide. It's possible that
>> instead of deciding to marry one of them, she'll deliver some other,
>> exceptional, verdict (eg "turns out my husband is still alive, and will
>> now murder you all").
>
>
> Just popping in quickly. First, everyone's all about CountDownLatch.
> Does this really work? It requires a fixed number of threads supplied on
> creation to "fire," iirc.

In this case, we expect exactly one event, Penelope's announcement of
either a choice of suitor or an exception such as "Husband returned
home.", so the initial count would be 1.

Patricia

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

Making one or more threads wait for another to produce a value or fail Tom Anderson <twic@urchin.earth.li> - 2011-05-31 15:00 +0100
  Re: Making one or more threads wait for another to produce a value or fail Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-05-31 07:14 -0700
    Re: Making one or more threads wait for another to produce a value or fail Tom Anderson <twic@urchin.earth.li> - 2011-05-31 16:46 +0100
      Re: Making one or more threads wait for another to produce a value or fail Deeyana <d.awlberg@hotmail.invalid> - 2011-05-31 19:23 +0000
        Re: Making one or more threads wait for another to produce a value or fail Tom Anderson <twic@urchin.earth.li> - 2011-06-01 22:12 +0100
      Re: Making one or more threads wait for another to produce a value or fail Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-05-31 20:45 -0700
        Re: Making one or more threads wait for another to produce a value or fail Patricia Shanahan <pats@acm.org> - 2011-05-31 21:37 -0700
          Re: Making one or more threads wait for another to produce a value or fail Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-06-01 07:18 -0700
            Re: Making one or more threads wait for another to produce a value or fail Patricia Shanahan <pats@acm.org> - 2011-06-01 09:01 -0700
        Re: Making one or more threads wait for another to produce a value or fail Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-01 16:40 +1200
          Re: Making one or more threads wait for another to produce a value or fail "John B. Matthews" <nospam@nospam.invalid> - 2011-06-01 11:22 -0400
            Re: Making one or more threads wait for another to produce a value or fail Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-02 10:15 +1200
              Re: Making one or more threads wait for another to produce a value or fail "John B. Matthews" <nospam@nospam.invalid> - 2011-06-01 21:38 -0400
        Re: Making one or more threads wait for another to produce a value or fail Tom Anderson <twic@urchin.earth.li> - 2011-06-01 22:07 +0100
          Re: Making one or more threads wait for another to produce a value or fail Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-06-01 22:46 -0700
  Re: Making one or more threads wait for another to produce a value or fail markspace <-@.> - 2011-05-31 08:26 -0700
    Re: Making one or more threads wait for another to produce a value or fail Tom Anderson <twic@urchin.earth.li> - 2011-05-31 19:13 +0100
  Re: Making one or more threads wait for another to produce a value or fail Patricia Shanahan <pats@acm.org> - 2011-05-31 09:06 -0700
    Re: Making one or more threads wait for another to produce a value or fail Paul Cager <paul.cager@googlemail.com> - 2011-05-31 10:08 -0700
      Re: Making one or more threads wait for another to produce a value or fail Patricia Shanahan <pats@acm.org> - 2011-05-31 10:39 -0700
        Re: Making one or more threads wait for another to produce a value or fail Paul Cager <paul.cager@googlemail.com> - 2011-05-31 16:24 -0700
  Re: Making one or more threads wait for another to produce a value or fail Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-01 12:33 +1200
    Re: Making one or more threads wait for another to produce a value or fail "John B. Matthews" <nospam@nospam.invalid> - 2011-06-01 00:38 -0400
  Re: Making one or more threads wait for another to produce a value or fail markspace <-@.> - 2011-06-02 14:10 -0700
    Re: Making one or more threads wait for another to produce a value or fail markspace <-@.> - 2011-06-02 14:25 -0700
    Re: Making one or more threads wait for another to produce a value or fail Patricia Shanahan <pats@acm.org> - 2011-06-02 14:43 -0700

csiph-web