This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Thread.yield() hangs win98 [was Re: Houston, we have threads...]
- From: Andrew Haley <aph at cambridge dot redhat dot com>
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Cc: "'Jeff Sturm'" <jsturm at one-point dot com>,Adam Megacz <gcj at lists dot megacz dot com>, java at gcc dot gnu dot org
- Date: Fri, 14 Dec 2001 18:19:41 +0000 (GMT)
- Subject: RE: Thread.yield() hangs win98 [was Re: Houston, we have threads...]
- References: <40700B4C02ABD5119F000090278766443BEE31@hplex1.hpl.hp.com>
Boehm, Hans writes:
> Given a choice, I would argue against implementing Thread.yield() as a noop.
Yes, of course.
> But if client code is written corectly, it's probably not a disaster to do
> so.
If the underlying thread system doesn't allow yielding then it'll have
to be a no-op. However, it ought to be possible to implement yield()
with a dummy thread which waits on a signal and then immediately sends
it back.
Andrew.