Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-145587: fix busy loop in multiprocessing.connection.wait on Windows#145597

Open
Shrey-N wants to merge 3 commits intopython:mainfrom
Shrey-N:145587
Open

gh-145587: fix busy loop in multiprocessing.connection.wait on Windows#145597
Shrey-N wants to merge 3 commits intopython:mainfrom
Shrey-N:145587

Conversation

@Shrey-N
Copy link
Contributor

@Shrey-NShrey-N commentedMar 6, 2026
edited by bedevere-appbot
Loading

On Windows,multiprocessing.connection.wait returns immediately if theobject_list is empty, regardless of the timeout.

This fix adds a check to make sure the function actually sleeps for the duration of the timeout, matching the Unix behavior and stopping the 100% CPU usage spike.

Verified locally:-

importtimefrommultiprocessing.connectionimportwaitstart=time.time()wait([],1.0)# took 0s before, now takes 1print(time.time()-start)

Fixes#145587

…WindowsEnsure wait() blocks for the specified timeout when object_list is empty, preventing 100% CPU usage. This aligns the Windows behavior with the Unix implementation.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gpsheadgpsheadAwaiting requested review from gpsheadgpshead is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

multiprocessing.connection.wait high CPU load with empty object_list

1 participant

@Shrey-N

[8]ページ先頭

©2009-2026 Movatter.jp