harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov" <alexey.v.varla...@gmail.com>
Subject Re: [drlvm] stress.Mix / MegaSpawn threading bug
Date Fri, 12 Jan 2007 10:41:26 GMT
2007/1/12, Salikh Zakirov <Salikh.Zakirov@intel.com>:
>
> > 2007/1/11, Gregory Shimansky <gshimansky@gmail.com>:
> >> Another reason for hanging threads is that they wait in Thread.start().
> >> When a new thread is started, it has to notify a lock object, in order
> >> to signal the parent thread that it has been created. This notification
> >> is sent from java code of the Thread before user code is executed.
>
> Alexey Varlamov replied:
> > IMO the problem is in this design rather than its impl. The
> > specification for j.l.Thread.start() does not require that execution
> > of run() begins strictly before the start() returned.
>
> 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.
>
>

Mime
View raw message