semaphores.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:docker-zenoss4 作者: krull 项目源码 文件源码
def getOverallDeferredSemaphore():
    global OVERALL_SEMAPHORE

    if OVERALL_SEMAPHORE is None:
        preferences = zope.component.queryUtility(
            ICollectorPreferences, 'zenpython')

        if preferences:
            OVERALL_SEMAPHORE = defer.DeferredSemaphore(preferences.options.twistedconcurrenthttp)
        else:
            # When we are running in a daemon other than zenpython, the preferences
            # value will not be available
            OVERALL_SEMAPHORE = defer.DeferredSemaphore(DEFAULT_TWISTEDCONCURRENTHTTP)

    return OVERALL_SEMAPHORE
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号