当前位置: 首页>>代码示例>>Python>>正文


Python ucollections.deque方法代码示例

本文整理汇总了Python中ucollections.deque方法的典型用法代码示例。如果您正苦于以下问题:Python ucollections.deque方法的具体用法?Python ucollections.deque怎么用?Python ucollections.deque使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ucollections的用法示例。


在下文中一共展示了ucollections.deque方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import ucollections [as 别名]
# 或者: from ucollections import deque [as 别名]
def __init__(self, runq_len=16, waitq_len=16, ioq_len=0, lp_len=0):
        self.runq = ucollections.deque((), runq_len, True)
        self._max_od = 0
        self.lpq = utimeq.utimeq(lp_len) if lp_len else None
        self.ioq_len = ioq_len
        self.canned = set()
        if ioq_len:
            self.ioq = ucollections.deque((), ioq_len, True)
            self._call_io = self._call_now
        else:
            self._call_io = self.call_soon
        self.waitq = utimeq.utimeq(waitq_len)
        # Current task being run. Task is a top-level coroutine scheduled
        # in the event loop (sub-coroutines executed transparently by
        # yield from/await, event loop "doesn't see" them).
        self.cur_task = None 
开发者ID:peterhinch,项目名称:micropython-async,代码行数:18,代码来源:core.py

示例2: __init__

# 需要导入模块: import ucollections [as 别名]
# 或者: from ucollections import deque [as 别名]
def __init__(self, runq_len=16, waitq_len=16):
        self.runq = ucollections.deque((), runq_len, True)
        self.waitq = utimeq.utimeq(waitq_len)
        # Current task being run. Task is a top-level coroutine scheduled
        # in the event loop (sub-coroutines executed transparently by
        # yield from/await, event loop "doesn't see" them).
        self.cur_task = None 
开发者ID:lemariva,项目名称:uPyCam,代码行数:9,代码来源:core.py

示例3: __init__

# 需要导入模块: import ucollections [as 别名]
# 或者: from ucollections import deque [as 别名]
def __init__(self, maxsize=0):
        super().__init__()
        self.maxsize = maxsize
        self._queue = deque((), maxsize) 
开发者ID:peterhinch,项目名称:micropython-samples,代码行数:6,代码来源:queue.py


注:本文中的ucollections.deque方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。