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' -

java - Log4j2 configuration not found when running standalone application builded by shade plugin -

python - How do I create a list index that loops through integers in another list -