多线程感知模式下的 BOOST 库 [英] BOOST libraries in multithreading-aware mode

查看:24
本文介绍了多线程感知模式下的 BOOST 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以在所谓的线程感知模式下编译 BOOST 库.如果是这样,您将看到...-mt..."出现在库名称中.我不明白它给了我什么,我什么时候需要使用这种模式?它能给我带来什么好处吗?

There is a possibility to compile BOOST libraries in the so-called thread-aware mode. If so you will see "...-mt..." appeared in the library name. I can't understand what it gives me and when do I need to use such mode? Does it give me any benefits?

不仅如此,我对在无线程感知机制(名称中没有 -mt)中编译 BOOST Threads 库感到非常困惑.这对我来说没有任何意义.看起来自相矛盾:/

More than that I'm really confused by having BOOST Threads library compiled in NO-thread-aware regime (with no -mt in the name). It does not make any sense for me. Looks self-contradictory :/

非常感谢您的帮助!

推荐答案

因为你没有说明你是如何构建的,在什么平台上,我会解释整个故事.在 Linux 和 Windows 上,Boost.Thread 库都是以 MT 模式构建的.在 Windows 上,默认情况下,您会获得 -mt 后缀.在 Linux 上,默认情况下在 1.42 中,您没有后缀.在 Linux 上没有后缀的原因是几乎没有其他库使用这种约定,无论如何它在 Linux 上都不那么重要.

Because you did not specify how you have built, and on what platform, I'll explain the whole story. Both on Linux and Windows, Boost.Thread library is built in MT mode. On Windows, by default, you get -mt suffix for it. On Linux, by default in 1.42, you get no suffix. The reason you get no suffix on Linux is that pretty much no other library uses such convention, and it's much less important on Linux anyway.

这能说明问题吗?

这篇关于多线程感知模式下的 BOOST 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆