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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -