Re: Simulate Thread.Join
- From: "Michael D. Ober" <obermd.@.alum.mit.edu.nospam>
- Date: Tue, 28 Aug 2007 09:38:57 -0600
Can I add to the array while it's being waited on? My problem domain
involves walking directories on a remote system and I don't know how many
threads will be created on any given run.
Mike.
"UL-Tomten" <tomten@xxxxxxxxx> wrote in message
news:1188309213.788789.64550@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 28, 3:06 pm, "Michael D. Ober" <obermd.@.alum.mit.edu.nospam>
wrote:
In the non-pooled System.Threading.Thread class, there is a Join method
that
will wait until the thread is complete. How can I easily simulate this
using the thread pool.
Use the static System.Threading.WaitHandle.WaitAll using
AutoResetEvents passed when Queueing your UserWorkItems.
http://msdn2.microsoft.com/en-us/library/system.threading.waithandle.waitall.aspx
.
- Follow-Ups:
- Re: Simulate Thread.Join
- From: UL-Tomten
- Re: Simulate Thread.Join
- References:
- Simulate Thread.Join
- From: Michael D. Ober
- Re: Simulate Thread.Join
- From: UL-Tomten
- Simulate Thread.Join
- Prev by Date: Re: Simulate Thread.Join
- Next by Date: Re: C# service, performs lots of things on start, windows doesnt give it enough time!
- Previous by thread: Re: Simulate Thread.Join
- Next by thread: Re: Simulate Thread.Join
- Index(es):
Relevant Pages
|