When working with tasks, a rule of thumb appears to be that the thread pool - typically used by e.g. invoking Task.Run()
, or Parallel.Invoke()
- shoul
You should not use TaskCreationOptions.LongRunning
in your case. I would use Parallel.For.
The LongRunning
option is not to be used if you're going to create a lot of tasks, just like in your case. It is to be used for creating couple of tasks that will be running for a Long Time.
By the way, i never used this option in any similar scenario.