Placeholder for the C ++ 0x <thread> header in MSVC ++ 2010

I already use some new features from C ++ 0x in Visual C ++ 2010, such as regular expressions or lambda functions. But there is one main feature that is missing: the header<thread> .

Do you know any code that can act as a replacement ?

I am currently using a boost stream, but this is not quite the same as the standard, and it gives me a huge compilation time. I also found only :: stream, but as an amateur, I do not want to spend money on it.

I don’t think it would be too hard to code (although I could be wrong), but I don’t know the Win32 API to do this.

+3
source share
3 answers

I used boost::threadthe code with performance, and it became more complex and perfect than anything we could create in a reasonable amount of time. In particular, the reader-writer’s castle is a thing of beauty. You have the added benefit that the person who wrote the code and the book is active when the stack overflows if you need help.

Since you are on Windows, you can improve compilation time by intelligently using Visual Studio precompiled headers to avoid reloading Boost headers.

+5
source

, boost::thread - . , std::thread. .

:


- boost:: thread. , : , , .
  • , -----os-thread, . , factory .
  • boost:: thread, . , ++. , - .
    • , .
    • , .
  • ( boost:: thread). .
  • ​​ , - (boost:: thread ). , , , ( ).
  • " ", , , .
+4

win32. . Google .

-1

Source: https://habr.com/ru/post/1766623/


All Articles