Event loop lock detector for Python
Project description
Event loop lock detector for Python.
Installation
pip install gadasyncblock
Usage
import contextlib
from fastapi import FastAPI
from gadasyncblock import AsyncBlock
# logger: asyncio.detector
detector = AsyncBlock(timeout=1)
@contextlib.asynccontextmanager
async def lifespan(_: FastAPI):
detector.start()
yield
detector.shutdown()
app = FastAPI(lifespan=lifespan)
@app.post("/run")
async def run():
time.sleep(2)
return {"message": "Blocked"}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gadasyncblock-0.0.2.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gadasyncblock-0.0.2.tar.gz.
File metadata
- Download URL: gadasyncblock-0.0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1b6b0c4de54dcb0df3be0c0564cb0c3987cd4872f8e8f96039b1850cd0744d8
|
|
| MD5 |
6dd65ef2ee217a8bae0bfd331e171bdf
|
|
| BLAKE2b-256 |
f846d38e640bf613846356bb9e3272442b0b3a85ddb4d8d3db8657ecd28460fe
|
File details
Details for the file gadasyncblock-0.0.2-py3-none-any.whl.
File metadata
- Download URL: gadasyncblock-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7767eae5f3e33ca058b96a25b1018b7e675053b0d77e2802bb34f63f62ea1fc3
|
|
| MD5 |
d6b4b661a3b32d4290fa4378aa2fedab
|
|
| BLAKE2b-256 |
bbdc2c5a7d10081adac26be6cae5c834d5e007bf1b81fb8ea2b3473c5202d466
|