Message278881
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. |
|
Date |
User |
Action |
Args |
2016-10-18 13:59:19 | vstinner | set | recipients:
+ vstinner, gvanrossum, methane, yselivanov |
2016-10-18 13:59:19 | vstinner | link | issue28448 messages |
2016-10-18 13:59:19 | vstinner | create | |
|