All thread object contain a private boolean varible flag that is set and reset
based on the the new STATE of the thread ( ie INTERRUPTED , NOT INTERRUPTED ).
The thread APIs like sleep() , wait() or join() will throw and InterruptedException when the
thread's state changes from *NOT INTERRUPTED*
On Thu, May 18, 2000 at 10:15:08AM +0700, yangyuex wrote:
> Thanks very much!
>
> What's your mean:
>
> "which BTW
> sets *INTERRUPTED* flag in the Thread object,
> The use of the an instance variable is redundant since the thread
> already has
> a flag designed for that perpose."
>
> I also t
Thanks very much!
What's your mean:
"which BTW
sets *INTERRUPTED* flag in the Thread object,
The use of the an instance variable is redundant since the thread already
has
a flag designed for that perpose."
I also think this is a feasible way.
Because I think the root for garbage collection are i
In a previous post I made an error in the code example
it should look like the following.
Allowing for the thread acsessing the hashtable extracting the
referenenced Thread object and calling Thread.interupt() , which BTW
sets *INTERRUPTED* flag in the Thread object,
The use of the an
I am assuming you are using jdk1.2 and in that case the stop method has been
depricated. You should use use Thread interrupt to stop the thread.
When you remove the Thread object from the hashtable issue a Thread.interrup()
call so the thread object unwinds correctly and exits the run method then
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Wed, May 17, 2000 at 11:27:00AM +0700, yangyuex wrote:
> I have several threads in one hashtable.
> When I remove one of them, whether this thread still consume CPU etc
> resources?
> That's to say, if I will not need one thread, whether I must st
Hi
I have several threads in one hashtable.
When I remove one of them, whether this thread still consume CPU etc
resources?
That's to say, if I will not need one thread, whether I must stop or
destory it explictly or
just remove it from hashtable for garbage collection?
I am not sure how JVM sch