queue.py 文件源码

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

项目:ccs-twistedextensions 作者: apple 项目源码 文件源码
def __init__(self, reactor, transactionFactory, useWorkerPool=True, disableWorkProcessing=False):
        """
        Initialize a L{ControllerQueue}.

        @param transactionFactory: a 0- or 1-argument callable that produces an
            L{IAsyncTransaction}

        @param useWorkerPool:  Whether to use a worker pool to manage load
            or instead take on all work ourselves (e.g. in single process mode)
        """
        super(ControllerQueue, self).__init__()
        self.reactor = reactor
        self.transactionFactory = transactionFactory
        self.workerPool = WorkerConnectionPool() if useWorkerPool else None
        self.disableWorkProcessing = disableWorkProcessing
        self._lastMinPriority = WORK_PRIORITY_LOW
        self._timeOfLastWork = time.time()
        self._actualPollInterval = self.queuePollInterval
        self._inWorkCheck = False
        self._inOverdueCheck = False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号