• Jason Madden's avatar
    Fix destroying the loop and properly close handles. · e4a04e89
    Jason Madden authored
    Sadly this exposes the fact that libuv doesn't allow multiple handles
    for a given poll fd. Nor does it raise clear errors until you try to
    close them in an order different from the inverse of the one they were
    created in. Doing so simply aborts the process when libuv realises that
    the watcher it has registered is not the watcher you're closing.
    
    This further means that multiple watchers wont' get the right set of
    events delivered, I think (though most of the tests were passing until I
    discovered this crash).
    e4a04e89
test__core_loop_run.py 644 Bytes