I was wondering if it is possible to somehow make parallel.for or parallel.foreach consume threads that only are assigned/created by a user. Is this even possible?
I was wondering if it is possible to somehow make parallel.for or parallel.foreach consume
Share
You can use an overload which has a
ParallelOptionsparameter (such as this one forParallel.For), and create such an options object using a customTaskScheduler. It’s not going to be terribly easy, admittedly… but it’s doable.For more information about task schedulers, see the MSDN section about them and some samples.