boost deadline_timer语言 - Linux 中的最大计时器数量

boost deadline_timer - max number of timers in Linux

本文关键字:计时器 Linux deadline timer 语言 boost      更新时间:2023-10-16

有谁知道在 Linux 的一个进程中可以创建的最大同时提升deadline_timer实例数是多少? 我相信boost使用Posix timer_create方法。

来自 Linux timer_create 手册页:

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)).

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