全部搜尋項
trixie  ] [  sid  ]
[ 原始碼: python-async-interrupt  ]

套件:python3-async-interrupt(1.2.0-1)

python3-async-interrupt 的相關連結

Screenshot

Debian 的資源:

下載原始碼套件 python-async-interrupt

維護小組:

外部的資源:

相似套件:

Interrupt context manager for asyncio

This Python module provides a context manager that can be used to interrupt a block of code as soon as possible when a future is done.

The purpose of async_interrupt is to raise an exception as soon as possible to avoid any race conditions. It is based loosely on async_timeout by Andrew Svetlov and cpython asyncio.timeout.

Usage:

 async with interrupt(future, ValueError, "message"):
     future.set_result(None)
     await asyncio.sleep(0)

This package is useful in scenarios where an exception needs to be raised immediately to prevent race conditions during asynchronous operations.

其他與 python3-async-interrupt 有關的套件

  • 依賴
  • 推薦
  • 建議
  • 增強

下載 python3-async-interrupt

下載可用於所有硬體架構的
硬體架構 套件大小 安裝後大小 檔案
all 6。8 kB33。0 kB [檔案列表]