Chris Angelico <ros...@gmail.com>: > On Tue, Nov 28, 2017 at 5:04 PM, Marko Rauhamaa <ma...@pacujo.net> wrote: >> Seems to be one of the fundamental multithreading issues: each thread >> is blocked on precisely one event. Asyncio is more flexible: you can >> multiplex on a number of events. > > Not really, no. Unless select() counts as "precisely one event", of > course.
Select() counts as asyncio. > That's the normal way for a thread to block on multiple events on a > Unix system. Windows has its own approximate equivalent. > > Surprise, surprise, that's also how event loops often implemented. > Including ones used in packages like asyncio. The original poster's problem seems to be caused by blocking APIs that cannot be multiplexed using select(). A good many Python facilities are the same way. Such blocknoxious APIs are at the core of the multithreading programming paradigm. Marko -- https://mail.python.org/mailman/listinfo/python-list