Difference threads.p and windows.h


Searching the internet I have seen in many tutorials that the threads.h library is used to create threads in windows, but in others they use the header windows.h directly. Which of the two should you use to create a thread? From what I've seen, I think it would give me "less headache" the bookstore threads.h ..

asked by Jogofus 21.06.2017 в 04:39

1 answer


The threads library (without extension) is available from the C ++ 11 standard (back in 2011). By being part of the standard the source code will be portable between systems.

Windows has its own API for process management. The advantage of using this library is that possibilities may be available that are not accessible from the standard library ... the counterpart is that the source code will not be portable to, for example, Linux systems.

answered by 21.06.2017 в 08:52