asyncio - run coroutine in the background

Paul Rubin no.email at nospam.invalid
Sat Feb 20 02:40:01 EST 2016


Marko Rauhamaa <marko at pacujo.net> writes:
> "Frank Millman" <frank at chagford.com>:
>> I would love to drive the database asynchronously, but of the three
>> databases I use, only psycopg2 seems to have asyncio support.
> Yes, asyncio is at its infancy. There needs to be a moratorium on
> blocking I/O.

Unfortunately there appears to be no way to open a file in Linux without
at least potentially blocking (slow disk or whatever).  You need
separate threads or processes to do the right thing.



More information about the Python-list mailing list