Yury Selivanov <yseliva...@gmail.com> added the comment: > My underlying question is why the Future has to set its loop in its > constructor, instead of simply using get_event_loop() inside > _schedule_callbacks(). This would always work.
So imagine a Future `fut` is completed. And we call `fut.add_done_callback()` in different contexts with different active event loops. With your suggestion we'll schedule our callbacks in different loops. Ideally you should use `loop.create_future()` when you can (and in libraries you usually can do that) to always make it explicit which loop your Future is attached to. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31960> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com