Skip to content
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

enhance socketpair code in tpool #167

Closed
wants to merge 1 commit into from
Closed

enhance socketpair code in tpool #167

wants to merge 1 commit into from

Commits on Nov 19, 2014

  1. enhance socketpair code in tpool

    tpool.setup() uses its own implementation of socket.socketpair().
    
    The "sock" socket is not explicitly closed, which emits a
    ResourceWarning with Python 3 when warnings are enabled (ex: python3
    -Wd).
    
    This change uses socket.socketpair() if available (which is now the case
    an all platforms since Python 3.5). It also ensures that the "sock"
    socket is closed, and that all sockets are closed in case of error.
    
    My code is based on the new socket.socketpair() implementation for
    Windows in Python 3.5.
    haypoenovance committed Nov 19, 2014
    Configuration menu
    Copy the full SHA
    d6f8f27 View commit details
    Browse the repository at this point in the history