使用 boost 库在 vc6 中创建多线程应用程序?
是否可以使用 boost 库在 VC6 中创建多线程应用程序? 如果可以的话有哪些相关的教程。
Is it possible to create a multithreading application in VC6 with boost library?
If it is possible, what are some relevant tutorials.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的,我已经成功地做到了这一点,但是使用的是 Boost v1.30.0。 因此,如果您在使用最新版本的 Boost 库时遇到问题,您可能需要退回一年或五年。 我记得在尝试升级 Boost 时,我开始遇到各种内部编译器错误,等 - 所以我没有,而是继续使用 v1.30.0,直到我能够升级视觉 C++ 也是如此。 即使旧版本的 Boost 也非常稳定和有用,只是功能较少。
Yes, I have done this successfully, but with Boost v1.30.0. So if you have trouble with the latest versions of the Boost libraries, you might want to go back a year or five. I recall I started getting all sorts of internal compiler errors, et al., when trying to upgrade Boost -- so I didn't, but rather went on using v1.30.0 until I was able to upgrade Visual C++ as well. Even the old versions of Boost are very stable and useful, they just have less features.
http://www.boost.org/doc/libs/ 1_37_0/doc/html/thread.html
http://www.boost.org/doc/libs/1_37_0/doc/html/thread.html
快速谷歌搜索“boost thread example”会发现很多不错的结果。
A quick google for "boost thread example" turns up lots of good hits.
Boost.Thread 库提供广告创建和操作工具。 阅读 boost 文档(litb 的答案中提供了链接)。 它还提供同步对象(互斥体)。 Boost 是跨平台的,并且与 VS6 兼容。
至于其余的 boost 库 - 它们通常是线程安全的,但请阅读每个特定库的详细文档。
The Boost.Thread library provides thead creation and manipulation facilities. Read the boost documentation (link was provided in litb's answer). It also provides synchronization bojects (mutexs). Boost is cross platform and is compatible with VS6.
As for the rest of the boost libraries - they are usually thread safe, but read the documentation of each particular library of details.