From: Tassilo Horn Date: 2004-10-17T00:04:27+09:00 Subject: Re: Again some problem with my multithreaded teadrinker app Markus writes: > I think (and this late in a long day for me, so I may be wrong) > that the problem is that you are using broadcast to wake the drinkers. > This causes a race condition (as they all assess the table contents "at > once") and an eventual deadlock. This has come in my mind, too, but... > I tried a quick test of 1) replacing the broadcast with a signal, > and 2) adding an else-clause so that the drinker re-signals if what he > finds on the table is not what he's wanting. ....if I do exactly this it deadlocks even faster. > It makes sense & seems to work, but I'm too pooped to vouch for it > beyond that. Hm, it makes sense to me, too. But how can it be that it works for you but not for me? I use ruby-1.8.2_pre2. > -- Markus Thanks and regards, Tassilo