Re: JavaMemoryModel: Thread.stop()

From: Bill Pugh (pugh@cs.umd.edu)
Date: Fri Apr 09 2004 - 09:21:40 EDT


I agree with Doron on this.

The thread receiving the the ThreadDeath should be guaranteed
to be synchronized with the creation of the ThreadDeath object.

And in general, our story is that anyway of reliably communicating
between threads creates a happens-before edge.

Even if it is a way of synchronizing that we discourage.

suspend/resume wouldn't count, because there isn't
any point in the suspended thread that is a clear marker
of the point at which the thread has received the suspension.

        Bill

On Apr 8, 2004, at 2:40 PM, Doron Rajwan wrote:

>
> Although deprecated for a long time, java.lang.Thread
> still have a public stop() method. This method causes
> ThreadDeath Error to be thrown at the destination
> thread, asynchronously. Moreover, it has an overload
> that accepts a specific instance to throw, which can
> be a class extending this ThreadDeath, and add
> additional fields, objects, arrays, and so.
>
> I think that when speaking on happens-before edge for
> interrupted threads, we should also consider stopped
> threads. At least in the stop(Throwable obj) overload,
> there must be a happens-before edge between the caller
> and the stopped thread.
>
> Thanks,
> Doron.
>
>
> =====
> Doron Rajwan, mailto:doron@rajwan.org
>
> -------------------------------
> JavaMemoryModel mailing list -
> http://www.cs.umd.edu/~pugh/java/memoryModel

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:02 EDT