This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
libgcj/8997: spin() calls Thread.sleep
- From: tromey at redhat dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 18 Dec 2002 22:23:30 -0000
- Subject: libgcj/8997: spin() calls Thread.sleep
- Reply-to: tromey at redhat dot com
>Number: 8997
>Category: libgcj
>Synopsis: spin() calls Thread.sleep
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 18 14:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Tom Tromey
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
I let in a small change to natObject.cc that changed spin() to call
Thread::sleep instead of usleep().
I think this was a mistake (to be honest I don't recall seeing that
code in a patch, double oops on me). spin() is used in the
implementation of _Jv_MonitorEnter; the point as I understand it is to
sleep a bit to avoid creating a heavyweight mutex. However,
Thread::sleep() acquires just such a mutex -- defeating the purpose of
spin().
(See java list for more info.)
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: