commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug #2685] Should Thread.stop() call ThreadGroup.removeThread().?


From: nobody
Subject: [Bug #2685] Should Thread.stop() call ThreadGroup.removeThread().?
Date: Tue, 25 Mar 2003 14:02:34 -0500

=================== BUG #2685: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2685&group_id=85

Changes by: David Holmes <address@hidden>
Date: Tue 03/25/03 at 19:02 (GMT)

------------------ Additional Follow-up Comments ----------------------------
No it most definitely should not call removeThread.

Thye action of stop is quite simply to throw an asynchronous exception in the 
thread. That exception is processed as normal and if not caught then the normal 
uncaught exception mechanics will perform a normal thread termination. Until 
that time the thread is very much alive and is quite free to catch and ignore 
the stop() request.



=================== BUG #2685: FULL BUG SNAPSHOT ===================


Submitted by: archie172               Project: classpath                    
Submitted on: Fri 02/28/03 at 22:08
Severity:  5 - Major                  Resolution:  None                     
Assigned to:  None                    Status:  Open                         
Platform Version:  None               

Summary:  Should Thread.stop() call ThreadGroup.removeThread().?

Original Submission:  Near the end of Thread.stop(), it calls:

  group.removeThread(this);

Since the VM is going to do this anyway when the
thread exits, this seems at best redundant.

Moreover, in the pathological case where the thread
actually catches ThreadDeath and then keeps doing
stuff, this is not just redundant but also wrong,
because the thread hasn't died yet, but it won't be
in its ThreadGroup anymore.

So this line should be removed.



Follow-up Comments
*******************

-------------------------------------------------------
Date: Tue 03/25/03 at 19:02         By: davidholmes
No it most definitely should not call removeThread.

Thye action of stop is quite simply to throw an asynchronous exception in the 
thread. That exception is processed as normal and if not caught then the normal 
uncaught exception mechanics will perform a normal thread termination. Until 
that time the thread is very much alive and is quite free to catch and ignore 
the stop() request.


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2685&group_id=85




reply via email to

[Prev in Thread] Current Thread [Next in Thread]