all options
trixie  ] [  sid  ]
[ Source: python-async-interrupt  ]

Package: python3-async-interrupt (1.1.1-2)

Links for python3-async-interrupt

Screenshot

Debian Resources:

Download Source Package python-async-interrupt:

Maintainers:

External Resources:

Similar packages:

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.

Other Packages Related to python3-async-interrupt

  • depends
  • recommends
  • suggests
  • enhances

Download python3-async-interrupt

Download for all available architectures
Architecture Package Size Installed Size Files
all 6.5 kB33.0 kB [list of files]