Search code examples
c++multithreadingunixmulticore

System.Threading.Tasks equivalent in UNIX and C++


I've read this article about multi-core processing:
https://blogs.msdn.microsoft.com/usisvde/2009/10/24/how-to-get-started-with-multi-core-parallel-processing-you-can-use/

In .NET Framework 4 there is a method called System.Threading.Tasks that can manage the available logical processors. Is there any way to do quite the same in C++ and UNIX without .NET Framework ?

By the same I mean avoid the overheard of the threads.


Solution

  • Not sure exactly what the .NET does but std::async / std::future allows parallel queuing of tasks.