Melodi17/Q-Limits

ParallelExecutor race condition

Closed this issue · 2 comments

tasks[i++] = Task.Run(

Is a race condition that could result in some tasks being abandoned. Prefer interlocked.increment(ref i)

Note: the increment behavior mimics ++i, not i++, so also change the starting index to compensate

I have trouble understanding and implementing this kind of threading, are you able to give me a larger example/sample or help me implement it?

Resolved in version 2.0.6