STINNER Victor added the comment:

INADA Naoki added the comment:
> @haypo, do you know why _WaitCancelFuture overrides _schedule_callbacks() 
> instead
> of self.add_done_callback(self._unregister_wait_cb)?
> _unregister_wait_cb must be called after all callbacks are called?

Oh no. I tried to forget this mess :-( It took me 2 or 3 months to
understand and fix this complex issue of cancelling a wait on
Windows...

Hum, let me check.

I found this in IocpProactor:
---
    def _wait_cancel(self, event, done_callback):
        fut = self._wait_for_handle(event, None, True)
        # add_done_callback() cannot be used because the wait may only complete
        # in IocpProactor.close(), while the event loop is not running.
        fut._done_callback = done_callback
        return fut
---

I don't understand my comment anymore /o\

I just recall that it was complex to get this crap working in all
cases, especially in corner cases.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28448>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to