8000 bpo-47003: Cleanup _overlapped module by asvetlov · Pull Request #31848 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

bpo-47003: Cleanup _overlapped module #31848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run CancelIOEx with GIL released
  • Loading branch information
asvetlov committed Mar 13, 2022
commit 2243f0b4cf5a76a6cd48ac4b5ba6bf8d6ea14be3
2 changes: 1 addition & 1 deletion Modules/overlapped.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,10 +707,10 @@ Overlapped_dealloc(OverlappedObject *self)
if (!HasOverlappedIoCompleted(&self->overlapped) &&
self->type != TYPE_NOT_STARTED)
{
Py_BEGIN_ALLOW_THREADS
if (CancelIoEx(self->handle, &self->overlapped))
wait = TRUE;

Py_BEGIN_ALLOW_THREADS
ret = GetOverlappedResult(self->handle, &self->overlapped,
&bytes, wait);
Py_END_ALLOW_THREADS
Expand Down
0