commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: Thread.holdLock implementation in java


From: Archie Cobbs
Subject: Re: Patch: Thread.holdLock implementation in java
Date: Wed, 16 Jun 2004 18:28:07 -0500 (CDT)

Dalibor Topic wrote:
> I've implemented VMThread.holdLock in java. It's is probably quite slow, 
> and wakes up the ocassional thread without much use, but hey, it's in 
> java, so that's one less method to implement. OK to commit?

Java in theory guarantees that threads are woken up only when
notified via notify(), though not all VMs follow this (typically
because they rely on pthread_cond variables, which don't provide
this guarantee). So it your implementation potentially could produce
bugs in otherwise correct programs.

This is not a reason to not add it, but at the minimum a comment should
be included with a warning, etc.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]