Skip to content

perf: avoid a worker thread for async state timeouts - #736

Open
noooooooookro wants to merge 1 commit into
fgmacedo:mainfrom
noooooooookro:fix/async-native-timeout
Open

noooooooookro wants to merge 1 commit into
fgmacedo:mainfrom
noooooooookro:fix/async-native-timeout

Conversation

@noooooooookro

Copy link
Copy Markdown

The async engine used to occupy a default executor worker for each active timeout. It now uses asyncio.sleep when it runs on the caller’s event loop. Synchronous callers keep the thread-based timer so custom timeout events can still fire between calls.

The full test suite passed with 100% branch coverage. Regression tests cover executor use, event ordering, and timeout delivery between synchronous calls.

Closes #613.

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pure-async timeout() handler to avoid thread pool usage

1 participant