From: Ian R. <ian...@ma...> - 2007-12-17 03:02:10
|
Tony Hosking wrote: > I think the question Athul needs an answer to is how to determine > that a "suspended"/"suspending" thread has actually reached its safe- > point and *really* is suspended. He only needs to do this for *one* > targeted thread, not *all* mutator threads like GC needs to. > Hi, so you know a thread is suspend as its state says so, but you only really know its suspended when its not queued anywhere. For the deprecated Thread suspend/resume API its ok that there is a delay between suspension and the thread being truly suspended. For OSR we suspend and yield at the same time. It seems the easiest place for Athul to determine that a thread has truly suspended is by writing to a field in suspendIfPending, this is the point that the thread becomes dequeued. Regards, Ian |