Skip to content

gh-161032: Convert BaseEventLoop._clock_resolution to asyncio.constants.CLOCK_RESOLUTION - #161033

Open
asvetlov wants to merge 3 commits into
python:mainfrom
asvetlov:claude/clock-resolution-constant-1660dc
Open

asvetlov wants to merge 3 commits into
python:mainfrom
asvetlov:claude/clock-resolution-constant-1660dc

Conversation

@asvetlov

@asvetlov asvetlov commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

BaseEventLoop.__init__ queried time.get_clock_info('monotonic').resolution for every loop and stored it in the private _clock_resolution attribute, which only _run_once reads. The value is process-wide and never changes, so compute it once as asyncio.constants.CLOCK_RESOLUTION.

🤖 Generated with Claude Code

…onstants.CLOCK_RESOLUTION

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -0,0 +1,2 @@
:mod:`asyncio`: The resolution of the monotonic clock is now computed once at

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change is internal, I suggest to skip news

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants