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: Sun, 27 Jul 2003 00:05:41 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

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

Changes by: Brian Jones <address@hidden>
Date: Sun 07/27/2003 at 00:05 (US/Eastern)

            What     | Removed                   | Added
---------------------------------------------------------------------------
         Assigned to | None                      | cbj


------------------ Additional Follow-up Comments ----------------------------
I have included a potential Mauve test, but I'm having trouble getting the JDK 
to prove to me the test is correct.  ThreadDeath is never seen in the instance 
of the 'stop' thread.

------------------ Additional Bug Attachment  ----------------------------
File name: stop.java                      Size:1 KB
stop.java is a mauve test for this functionality that does not work yet
http://savannah.gnu.org/bugs/download.php?group_id=85&amp;bug_id=2685&amp;bug_file_id=557



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


Submitted by: archie172               Project: classpath                    
Submitted on: Fri 02/28/2003 at 17:08
Severity:  5 - Major                  Resolution:  None                     
Assigned to:  cbj                     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: Sun 07/27/2003 at 00:05       By: cbj
I have included a potential Mauve test, but I'm having trouble getting the JDK 
to prove to me the test is correct.  ThreadDeath is never seen in the instance 
of the 'stop' thread.

-------------------------------------------------------
Date: Tue 03/25/2003 at 14: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


File Attachments
****************

-------------------------------------------------------
Date: Sun 07/27/2003 at 00:05  Name: stop.java  Size: 1KB   By: cbj
stop.java is a mauve test for this functionality that does not work yet
http://savannah.gnu.org/bugs/download.php?group_id=85&amp;bug_id=2685&amp;bug_file_id=557


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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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