This is the mail archive of the
mailing list for the Mauve project.
Re: New java.lang.Thread tests
>>>>> "Mark" == Mark Wielaard <email@example.com> writes:
Mark> I didn't need it for the join() but I needed it since I wanted
Mark> to notify() the Thread object. The join() just happened to be
Mark> included in the synchronized block by accident.
I debugged gij running this test. It does definitely hang.
>From JLS 2nd Ed, 17.14:
The notify method should be called for an object only when the
current thread has already locked the object's lock. If the wait
set for the object is not empty, then some arbitrarily chosen
thread is removed from the wait set and re-enabled for thread
scheduling. (Of course, that thread will not be able to proceed
until the current thread relinquishes the object's lock.)
See the parenthetical statement. `notify' doesn't unlock the object
when it performs its task. So I think that we are *required* to hang
for this program, and that instead you've found a kaffe bug. Do you