O'Reilly logo

C++ Multithreading Cookbook by Milos Ljumovic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How threading works in .NET

An application that is executed on a CPU with more than one core should benefit from concurrent execution, with as many concurrent tasks as there are logical cores to execute on. Of course, there are many questions that need to be taken care of when we want to execute parallel tasks:

  • How to divide a set of tasks so that each of them is executed in a multicore environment?
  • How to ensure that the number of concurrent tasks doesn't exceed the number of CPU cores?
  • If some task is stopped, such as when you wait for I/O, how to discover this and make the CPU execute something else while waiting for I/O completion?
  • How to find out when one or more parallel operations are completed?

When you use a framework, answers to these questions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required