harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Salikh Zakirov <Salikh.Zaki...@Intel.com>
Subject Re: [drlvm] stress.Mix / MegaSpawn threading bug
Date Fri, 12 Jan 2007 15:50:01 GMT
Gregory Shimansky wrote:

>>> This requirement is implicated by specification of Thread.isAlive():
>>>
>>>    Tests if this thread is alive. A thread is alive
>>>    if it has been started and has not yet died.
>>>
>> I see no problem here: isAlive() must return true after the start()
>> returned, so the thread state is consistent, and that's all.
> 
> I've made an experiment with the patch below. I've removed wait/notify
> mechanism and set isAlive in the start method right after
> VMThreadManager.start is called. So isAlive is set twice, on the stack
> of parent thread, and on the stack of created thread before calling
> java. This seem to work just fine, all tests have passed, eclipse works
> too.
> 
> I wonder why all this wait/notify stuff was written at all. I think we
> can get rid of it.


I've just noticed, that very similar code was there before committing
HARMONY-1648. Unfortunately, Nikolay did not describe implications of
synchronous thread start on stop() method.


--
Salikh


Mime
View raw message