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

Google sheets equipment borrowing system -

Meteor Users collection vs additional collection -

javascript - Filter Radio Elements -