Thursday, May 20, 2010

Error using WaitHandle.WaitAll() in STA thread.

REF:http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/eefc0160-987c-47e1-a41b-bbae96726ec4/

If you don't need to run in STA, you can decorate Main with:

C#: [MTAThreadAttribute()]

VB:

and then use WaitHandle.WaitAll(your_WaitHandle_array) as originally intended.

No comments: