For more such videos visit
For more such videos subscribe
See our other Step by Step video series below :-
Learn C# Step by Step
Learn Design Pattern Step by Step:-
Learn Angular tutorial step by step
Learn MVC Core step by step :-
Learn Azure Step by Step :-
Learn SharePoint Step by Step in 8 hours:-
Python Tutorial for Beginners:-
Learn Data Science in 1 hour :-
Learn Power BI Step by Step:-
Learn MSBI Step by Step in 32 hours:-
Learn SQL Server Step by Step
Learn Tableau step by step :-
In this video we will see 3 big uses of TPL( Task parallel library)
parallel processing,pooling and abstraction. We also point how threads differ from threads.
We are also distributing a 200 page Ebook “.NET Interview Question and Answers”. If you want this ebook please share this video in your facebook/twitter/linkedin account and email us on
questpond@questpond.com with the shared link and we will email you the PDF.
Nguồn:https://wijstaanvooronzegrondrechten.org/
Xem Thêm Bài Viết Khác:https://wijstaanvooronzegrondrechten.org/cong-nghe
Nice. Many thanks!
Nice video. thanks to the creator. However, it raises a few questions:
1. What if I wish to run a task forever according to its own logic
(in which case the 'For" of the Parallel.For is not required).
Thus, I need a one time launch … and let the thread run as long as its own logic says so.
2. How do I enquire a core's overload to correctly set task-core affinity?
3. Which API is used to set affinity?
4. I don't understand why the Parallel.For is used … there is a for () loop statement in the task's code?
5. It is unclear to me from the core overload chart whether we see 4 identical tasks running on 4 cores concurrently?
If this is a single task running on all 4 cores. then:
(a) what exactly controls splitting its work among cores and then combine the results as if it was executed on a single core.
(b) how come the overload of all cores is similar to the overload of the execution of a single core. Where is the benefit?
in the execution period length?
Please set your second video here
I have to say that concatenating a string with s = s+"x" one million times is absolute a killer for memory and GC
Good video
In the first example you run a single thread and in the second you run MANY threads
Fast-forward to 8:31 if you already understand threading and using perfmon and actually wish to get to TPL.
Good one 👍🏻
Is this code not doing 1 million * RunMillionIterations() I think you can drop the one of the for… probably the one inside RunMillionIterations
how to implement this in infinite loop?
Excellent 👌👌
The explanation here is not correct. He took a single threaded "for loop" and placed it on a single thread. Well, that is in fact multi threading. Your fist thread is the thread of your application itself. The second thread is the "for loop", for a total of 2 threads. What you are really talking about is parallelizing work that is "normally" single threaded, which is distinctly different.
There seems to be a misconception here, when we spawn a new thread like shown in first part off video, it is not for completing task faster, it is just for making calling thread free and assigning task to another thread. By this its obvious that all cores of cpu will not take same load. Because spawned thread running on one core is processing assigned task and meanwhile calling thread finishes with main function.
I love your concise to the point tutorials….Very helpful.
really good video. what i suspected was happening but very clever way of proving it.
Where is the second part of TPL video?
Questpond has top notch videos and the explanations are among the best anywhere. Especially the design patterns series – simple to grasp some complex subjects! Excellent job Questpond! I'll likely sign up with them shortly.
great video,
Good video. Liked the perfmon demo.
P2(intel Pentium 2) is single core btw
video for mutex semaphore, semaphoreslim is missing in questpond.com. Pls put it back
nice explanation. Awesome work.
If you spawn two or more threads manually it will parallelize but you will need callbacks unless its fire and forget.
How do thread branches execute? If I spawn a thread from a thread does it time slice or does it parallelize. I guess I could experiment and find out.
What a nice tutorial!
This video really helped me. Thank you !
Nice video with ample of information demonstrating comparison of legacy multi threading and modern TPL
After inserting the Parallel.For-Call the total amount of iterations is 1,000,000 * 1,000,000. For unexperienced viewers leaving the old for loop in the program could be confusing.
Author seems to be under impression that PII processor means processor have two cores. Rather PI to PIV are all single core processors, only after arrival of dual core pentiums we had multiple cores and later it was followed by core 2, I3,I5,I7.
I think we do not need "for loop" in the method while we are using parallel class in the example mentioned in the video..
Correct me if am wrong, Parallel.For runs from 0 to million each time it calls a function RunMillionIterations(). This means that the each function call will be divided among processors/ available threads. However, i see the explanation saying the whole iteration is divided among iteration that is kind of confusing.