Would it be possible to request Nikolay/Artem/Andrey to comment on this, since the reason does not seem obvious ?
On 1/12/07, Salikh Zakirov <[EMAIL PROTECTED]> wrote:
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
