全部搜索项
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 [文件列表]