[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Need help w/problem with Thread.join() called from ApplicationWindow UI
|
I've been fighting this for the last 3 hours and need some help.
I have a UI based on ApplicationWindow, it runs a check scanner.
When the ScanAll button is pressed a class which extends Thread is started
to run the scanner until all checks in the hoper are scanned. This works
fine.
The Thread class works as expected when it runs the full course and detect
the hoper is empty.
A Cancel Scan All button is supposed to stop the Thread before the hopper
is empty. When the Cancel All button is pressed a signal is sent to the
Thread class to stop after it finishes the current check and otherwise act
as if all the checks had been scanned.
CancelAll sends the signal and calls Thread.join() method to wait for the
Thread class to complete then does some other stuff after the
Thread.join().
The problem is that execution of the Thread class stops immediately by
Thread.Join(), the rest of the code in the SelectionLister for the
CancelAll button is executed (other stuff) and the JVM stops responding.
Thread.join() in killing the Thread (without letting it complete) and
sends the JVM into never-never land. No exceptions or errors are
generated.
Does this sound familar to anyone?
Im working with M5, on Windows 2000 with Sun 1.4.1_01.
Thanks all
Bill