This document is for Kombu's development version, which can be significantly different from previous releases. Get the stable docs here: 5.0.
资源管理- kombu.resource
¶
通用资源池实施。
- class kombu.resource.Resource(limit=None, preload=None, close_after_fork=None)[源代码]¶
资源池。
- exception LimitExceeded¶
已超过限制。
- acquire(block=False, timeout=None)[源代码]¶
获取资源。
论点:¶
- BLOCK(Bool):如果超过限制,
然后阻止,直到有可用的项目。
- 超时(浮点数):等待超时
如果
block
是真的。缺省值为None
(永远)。
- 提升LimitExceed:
IF BLOCK为FALSE且已超过限制。:
- close_after_fork = False¶
- property limit¶