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

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 <>
Python-bugs-list mailing list

Reply via email to