views:

302

answers:

1

Hi,

i am looking for the solution for multi threading in c# .net compact framework. though threadpool class is good solution but is there any way to sync them like WaitHandle.WaitAll in compact framework?

+1  A: 

I'm not sure I understand the problem. The ThreadPool works just like on the desktop. For thread synchronization objects, you have all of the usual suspects from the System.Threading namespace. Admittedly, the CF omits a few nice-to-have methods (like WaitAll), but those can either be worked around (multiple waits in succession), you can P/Invoke the Create/Wait APIs or you can use the Smart Device Framework, which has all of the sync objects fully implemented.

ctacke
hi,thanks for the nice link. But i solved the problem using .net CF's WaitOne() method and using an AutoResetEvent object which is set when all the threads are reached to their completion.
Madhup