I'm creating a system which will spawn a lot of worker tasks and in some point of my app I'm doing a Task.WaitAny to retrieve the first finished task.
My concern is about how many tasks can I send to WaitAny, I know WaitHandle's WaitAny/All only can support up to 64 wait handles and I'm not sure if the underlying mechanism on Task.WaitAny uses internally wait handles to wait for a finished task and thus these limits apply to them.
Is there any limit to how many tasks can be passed to Task.WaitAny like with WaitHandles or there's no limit?
Cheers.
asyncto the mix one day, you should consider using TPL...that's just from my experience though. In any case, you won't need to worry about limits with action blocks...and if you thread the code properly you will be able to wait for all action blocks to complete, which makes your problem go away...