1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
Source: python-async-interrupt
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Uploaders:
Edward Betts <edward@4angle.com>,
Section: python
Priority: optional
Build-Depends:
debhelper-compat (= 13),
dh-sequence-python3,
pybuild-plugin-pyproject,
python3-all,
python3-poetry-core,
Build-Depends-Indep:
python3-pytest <!nocheck>,
python3-pytest-asyncio <!nocheck>,
python3-pytest-cov <!nocheck>,
Rules-Requires-Root: no
Standards-Version: 4.7.1
Homepage: https://github.com/Bluetooth-Devices/async_interrupt
Vcs-Browser: https://salsa.debian.org/python-team/packages/python-async-interrupt
Vcs-Git: https://salsa.debian.org/python-team/packages/python-async-interrupt.git
Package: python3-async-interrupt
Architecture: all
Depends:
${misc:Depends},
${python3:Depends},
Description: 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.
|