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

bpo-34323: IocpProactor: prevent modification if closed #11494

Merged
merged 1 commit into from Jan 10, 2019

Conversation

Projects
None yet
4 participants
@vstinner
Copy link
Member

vstinner commented Jan 10, 2019

  • _wait_for_handle(), _register() and _unregister() methods of
    IocpProactor now raise an exception if closed
  • Add "closed" to IocpProactor.repr()
  • Simplify IocpProactor.close()

https://bugs.python.org/issue34323

IocpProactor: prevent modification if closed
* _wait_for_handle(), _register() and _unregister() methods of
  IocpProactor now raise an exception if closed
* Add "closed" to IocpProactor.__repr__()
* Simplify IocpProactor.close()

@vstinner vstinner requested review from 1st1 and asvetlov as code owners Jan 10, 2019

@vstinner vstinner changed the title IocpProactor: prevent modification if closed bpo-34323: IocpProactor: prevent modification if closed Jan 10, 2019

@vstinner vstinner removed the skip issue label Jan 10, 2019

@vstinner

This comment has been minimized.

Copy link
Member

vstinner commented Jan 10, 2019

I wrote this change to prepare IocpProactor.close() fix for https://bugs.python.org/issue34323 and to make the code more reliable.

@asvetlov
Copy link
Contributor

asvetlov left a comment

LGTM!

@vstinner vstinner merged commit 9b07681 into python:master Jan 10, 2019

5 checks passed

Azure Pipelines PR #20190110.5 succeeded
Details
bedevere/issue-number Issue number 34323 found
Details
bedevere/news "skip news" label found
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@vstinner vstinner deleted the vstinner:iocp_closed branch Jan 10, 2019

vstinner added a commit to vstinner/cpython that referenced this pull request Jan 15, 2019

IocpProactor: prevent modification if closed (pythonGH-11494)
* _wait_for_handle(), _register() and _unregister() methods of
  IocpProactor now raise an exception if closed
* Add "closed" to IocpProactor.__repr__()
* Simplify IocpProactor.close()

(cherry picked from commit 9b07681)

vstinner added a commit that referenced this pull request Jan 15, 2019

[3.7] bpo-34323: Enhance IocpProactor.close() log (GH-11565)
* IocpProactor: prevent modification if closed (GH-11494)

* _wait_for_handle(), _register() and _unregister() methods of
  IocpProactor now raise an exception if closed
* Add "closed" to IocpProactor.__repr__()
* Simplify IocpProactor.close()

(cherry picked from commit 9b07681)

* bpo-34323: Enhance IocpProactor.close() log (GH-11555)

IocpProactor.close() now uses time to decide when to log: wait 1
second before the first log, then log every second. Log also the
number of seconds since close() was called.

(cherry picked from commit b1e4573)

* bpo-34323: Enhance IocpProactor.close() log again (GH-11563)

Add repr(self) to the log to display the number of pending overlapped
in the log.

(cherry picked from commit b91140f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment