Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 2002 07:48:01 -0700 (PDT)
From:      Nick Johnson <freebsd@spatula.net>
To:        freebsd-java@freebsd.org
Subject:   Thread.sleep implementation
Message-ID:  <20020808074233.T13773-100000@turing.morons.org>

next in thread | raw e-mail | index | archive | help
I've noticed that in threads which are trying to make locks or wait to
retry on some failure condition, the JVM tends to suddenly begin using
tons of CPU, despite the presense of a Thread.sleep() call inside the
loop.

What seems to also happen is starvation of the other threads, almost as
though Thread.sleep were implemented as a busy loop (?).  I'll try to come
up with a test case for this.  I bring it up here in case someone closer
to the JVM's internals might know what I'm talking about...

   Nick



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020808074233.T13773-100000>