跳转到正文

tasks API ​

完整接口目录 · 插件运行时用法 · 工具包下载

模块说明 ​

text
Bounded ownership of cooperative asyncio tasks; not a thread/process sandbox.

TaskOwner ​

python
class TaskOwner

SDK 说明:

text
Internal Worker task scope. A failed child synchronously fails its owner.

TaskOwner.__init__ ​

python
def __init__(self, on_failure, limit)

TaskOwner.open ​

python
def open(self)

TaskOwner.seal ​

python
def seal(self)

TaskOwner.check ​

python
def check(self)

TaskOwner.spawn ​

python
def spawn(self, coroutine, *, name=None)

TaskOwner.begin_join ​

python
def begin_join(self)

SDK 说明:

text
Seal and request cancellation once, shared by Drain and shutdown.

TaskOwner.join ​

python
async def join(self)

SDK 说明:

text
Wait for actual termination, even when this waiter is cancelled.

Concurrent callers share the same cancellation and completion boundary.
Uncooperative code may require the Host's process termination boundary.

Neomega · 使用、开发与参考文档