Author Ben.Darnell
Recipients Ben.Darnell, Big Stone, asvetlov, lukasz.langa, vstinner, yselivanov
Date 2019-06-22.22:05:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> From my understanding, there is no issue for Tornado itself. If Jupiter Notebook needs Tornado, Tornado needs selector event loop on Windows -- Jupiter can install the proper loop.

Right. I'm just advocating for something that would make the transition smoother than each project independently stumbling across this issue and adding their own patch (and then fielding support issues from users who have ended up with a combination of versions that doesn't quite work). This of course depends on how many affected projects there are; I know Jupyter is the biggest but they're not the only one. 

There's no more direct way, but a thread that does select() should work. In fact, ProactorEventLoop could simply spin up a SelectorEventLoop in another thread when one of the FD methods is called, and proxy the callbacks back and forth. 

    def add_reader(self, fd, callback, *args):
        if not self.selector_started:
        self.selector.call_soon(self.selector.add_reader, fd, lambda: self.call_soon(callback, *args))

    def start_selector(self):
        self.selector = SelectorEventLoop()
        def target():
        thread = threading.Thread(target=target)
        # Clean shutdown is left as an exercise for the reader.

Unifying the two interfaces like this would be preferable to adding more complexity for configuration IMHO.
Date User Action Args
2019-06-22 22:05:04Ben.Darnellsetrecipients: + Ben.Darnell, vstinner, asvetlov, lukasz.langa, yselivanov, Big Stone
2019-06-22 22:05:04Ben.Darnellsetmessageid: <>
2019-06-22 22:05:04Ben.Darnelllinkissue37373 messages
2019-06-22 22:05:03Ben.Darnellcreate