Re: Simulate Thread.Join



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



.



Relevant Pages

  • RE: Moving files - Input from text file
    ... I got the array created, ... folder on the remote system. ... Set Network = CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Re: Performance improvement possible?
    ... processing the array was inefficient so I got rid of the array ... file.puts *stats file.fsync end ... storing output form the main simulation program when it was all in C/C++ ... it feels more natural to the problem domain. ...
    (comp.lang.ruby)
  • Re: To Hungarian or not to Hungarian
    ... following it with something that connects it to the visual component it is ... it's problem domain plus a suffix (where appropriate for helping ... Airspeed_p - a pointer to the array ... problem domain purpose of the variable. ...
    (borland.public.delphi.non-technical)