2012-08-10 39 views
1

有谁知道在Linux的进程中可以创建同时boost deadline_timer实例的最大数量吗?我相信boost会使用Posix timer_create方法。boost deadline_timer - Linux中的最大定时器数

+0

我相信asio已经使用['timerfd_create'](http://www.kernel.org/doc/man-pages/online/pages/man2/timerfd_create.2 .html)[现在有一段时间](http://comments.gmane.org/gmane.comp.lib.boost.asio.user/3639) – 2012-08-10 15:39:16

回答

1

在Linux timer_create manpage

The kernel preallocates a "queued real-time signal" for each timer created 
using timer_create(). Consequently, the number of timers is limited by the 
RLIMIT_SIGPENDING resource limit (see setrlimit(2)). 

使用ulimit -i在bash要获取或设置RLIMIT_SIGPENDING。在我的Ubuntu服务器上,该限制默认为16382.

相关问题