Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 140691

Summary: target does not show terminated when it is
Product: [Eclipse Project] Platform Reporter: Darin Wright <darin.eclipse>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Darin Wright CLA 2006-05-08 17:16:06 EDT
3.2RC3

Debug the following program. When all 100 threads have been created, terminate the program. Each thread is removed, but the target and proess do not update as "terminated" even though the launch does. Pressing 'remove all terminated' does not remove the launch from the view, although its console is removed.



public class LotsOThreads {

	class BusyWork implements Runnable {

		int count;
		
		BusyWork(int i) {
			count = i;
		}
		
		public void run() {
			while (true) {
				try {
					Thread.sleep(1000);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				if (count == 1 || count == 75) {
					System.out.println("One or the other"); // BREAKPOINT
				}
			}
		}
		
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new LotsOThreads().foo();
	}
	
	public void foo() {
		for (int i = 0; i < 100; i++) {
			new Thread(new BusyWork(i)).start();
			try {
				Thread.sleep(50);
			} catch (InterruptedException e) {
			}
		}
	}

}
Comment 1 Darin Wright CLA 2006-05-08 17:23:24 EDT
Note, if I wait about 30-45 secs after terminating, the process/target eventually update as terminated.
Comment 2 Darin Wright CLA 2006-07-14 12:23:03 EDT
Fixed with bug 149728 

*** This bug has been marked as a duplicate of 149728 ***