P
palaga
hi
I'm using QueueUserWorkItem to execute a bunch of tasks using the thread
pool. Once started, I would like to wait for all of them to finish, using
something like WaitAll. Is there a way I can know when a thread pool
workItem has finished executing ? (My only solution at this time is to use
an autoreset event that is reset before I enqueue the workItem, that is set
by my workitem when it finishes.). Is there a built-in mechanism in the
thread pool to avoid using my own autoresetEvent ?
thanks
I'm using QueueUserWorkItem to execute a bunch of tasks using the thread
pool. Once started, I would like to wait for all of them to finish, using
something like WaitAll. Is there a way I can know when a thread pool
workItem has finished executing ? (My only solution at this time is to use
an autoreset event that is reset before I enqueue the workItem, that is set
by my workitem when it finishes.). Is there a built-in mechanism in the
thread pool to avoid using my own autoresetEvent ?
thanks