【问题标题】:Failure cases of pthread_cond_initpthread_cond_init 失败案例
【发布时间】:2012-03-01 06:44:27
【问题描述】:

如果出现以下情况,pthread_cond_init() 函数将失败:

EAGAIN 系统缺少初始化另一个条件变量所需的资源(内存除外)。

来自pthread_cond_init()的手册页。

引用中提到的其他资源可能是什么?

【问题讨论】:

  • 可能是任何其他依赖于实现的本机资源,例如。句柄,非分页池。

标签: multithreading pthreads


【解决方案1】:

这可能是每个线程的条件变量数量的限制。

【讨论】:

    猜你喜欢
    • 2013-12-08
    • 2012-08-14
    • 1970-01-01
    • 2013-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-24
    • 2017-09-29
    相关资源
    最近更新 更多