Which C++ signals/slots library should I choose?

前端 未结 11 1457
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 00:10

I want to use a signals/slots library in a project that doesn\'t use QT. I have pretty basic requirements:

  1. Connect two functions with any number of parameters
11条回答
  •  被撕碎了的回忆
    2020-12-01 00:53

    Recently inherited a project where connect was producing too much overhead for our project goals. Profiling revealed the use of a mutex in the signal, which was unneeded given our signal usage. Replaced with a dummy mutex per the documentation with success. The mutex is "drastically slower", so be sure you need it. This may be useful for others skimming this post.

    Original typedef boost::signals2::signal_type::type signal_type;

    New typedef boost::signals2::signal_type >::type signal_type;

提交回复
热议问题