简体   繁体   English

C ++多线程?

[英]C++ Multi-threading?

我最近决定用C ++制作游戏,但我发现C ++中没有多线程支持:(有库,但是它们依赖于平台,这并不是很好。是否有任何方法可以实现此平台-独立于C ++?

C++11 has built-in threading support (as part of the language as well as the standard library). C ++ 11具有内置的线程支持(作为语言和标准库的一部分)。

http://en.wikipedia.org/wiki/C%2B%2B11#Multithreading_memory_model http://en.wikipedia.org/wiki/C%2B%2B11#Multithreading_memory_model

http://en.wikipedia.org/wiki/C%2B%2B11#Threading_facilities http://en.wikipedia.org/wiki/C%2B%2B11#Threading_facilities

Also, boost::thread (boost::asio I believe) does offer (more or less) platform independent threading support (and it's not the only library that offers this). 另外,boost :: thread(我相信boost :: asio)确实提供了(或多或少)平台无关的线程支持(并且它不是唯一提供此功能的库)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM