C++0x 线程问题
我有一个关于 c++0x 标准线程的问题。现在可以使用它们吗(在 vc++ 2010 中)?我看到人们提供了如何使用它们的教程,但我有点困惑该库是否真的可以在 atm 上使用。我知道你可以在 vc++ 中使用“auto”之类的东西,所以我想我会问:.每次我尝试使用新线程时,尝试包含它们时都会出错。这让我认为我的问题的答案是“否”,但是教程+其他使用它们的人到底怎么样了!?
如果没有,有人可以指出我正确的方向吗?我只想了解线程,而不必担心平台:。
I have a question regarding the c++0x standard threads.Can they be used at the moment (in vc++ 2010)? I see people providing tutorials on how to use them, but im a bit confused if the library can actually be used atm. I know you can use things like "auto" in vc++, so i thought i'd ask :. Every time i try and use the new threads, i get errors when trying to include them. This makes me think the answer to my question is "No", but wtf is up with the tutorials+other people using them!?
If not, can someone point me in the right direction? I just want to learn about threads, and not have to learn worry about platforms :.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
VC++ 2010 中不存在标准线程。也许您应该尝试 Boost 线程库;标准线程库基于它,因此一旦 VC++ 支持标准线程,迁移可能会非常容易。
至于其他编写有关它们的教程的人,VC++ 是众多编译器中的一种,其他编译器可能会更快地支持新标准。
No standard threading exists in VC++ 2010. Maybe you should try the Boost threads library; the standard threading library is based off it so migration will likely be very easy once VC++ does support standard threading.
As for other people writing tutorials about them, VC++ is one compiler among many, and others may be quicker to support the new standard.
http://www.stdthread.co.uk/
请注意,该库是< em>不是免费的。
http://www.stdthread.co.uk/
Note that the library is not free.