c# - Some items of Parallel.ForEach<T> runs on ThreadPool, some doesn't -


i have simple algorithm this:

parallel.foreach(mylist, new paralleloptions() { maxdegreeofparallelism = 4 } ,(job) => job.dosomething());   

mylist list<mytype>.

mytype has void dosomething().

inside dosomething check thread.currentthread.isthreadpoolthread. threads aren't "threadpooled";

the functions defined in parallel use thread called function 1 of worker threads. non thread pool threads jobs done on thread called parallel.foreach from.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -