Re: Thread-end monitoring
- From: "mark" <mkazmierski@xxxxxxxxx>
- Date: 12 Nov 2006 07:06:54 -0800
Hello,
Depending on how your threads are arranged, you can use a CountdownLatch
or a CyclicBarrier from the java.util.concurrent package.
Thank you for your quick answer. I have looked at both of the classes
and it seems that both are inappropriate for my case. CountdownLeach is
not good, because at the beginning I do not know the number of the
created threads (that number can changes depending on the execution of
the threads). Cyclic barrier is also not good, because I just want to
check the situation when the thread finish (I am not going to resume it
again) so using it I think will make java to keep every thread running
and what I want is just to allow the garbage collector to remove them
just to create a space for a new threads. If I am wrong please tell me.
Regards, mark
.
- References:
- Thread-end monitoring
- From: mark
- Re: Thread-end monitoring
- From: Daniel Dyer
- Thread-end monitoring
- Prev by Date: Re: Thread-end monitoring
- Next by Date: Re: Stranger compiler error?
- Previous by thread: Re: Thread-end monitoring
- Next by thread: Re: Thread-end monitoring
- Index(es):