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

查看:250
本文介绍了在多线程感知模式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?

比我真的有BOOST线程库中的NO-线程感知制度汇编(名称中没有-mt)混淆更多。它没有任何意义我。看起来自相矛盾的:/

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上没有后缀的原因是pretty多少没有其他库使用这样的约定,这是很重要的要少得多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天全站免登陆