Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.python Subject: Re: asyncio - run coroutine in the background Date: Fri, 19 Feb 2016 23:40:01 -0800 Organization: A noiseless patient Spider Lines: 10 Message-ID: <871t877ru6.fsf@jester.gateway.pace.com> References: <8737sumpjl.fsf@elektro.pacujo.net> <87h9ha8lt0.fsf@jester.gateway.pace.com> <87d1rwpwo2.fsf@elektro.pacujo.net> <87r3gc608i.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="3c7a0b0f75f6c95b248ff930d17c36e7"; logging-data="27489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19f8v3LVnXIsk7xG4PH6JoN" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:y2+bxVrKp1w+CL0AuosN/CabBQk= sha1:v/sUjExYlVWnw828zWgb95QFVzA= Xref: csiph.com comp.lang.python:103241 Marko Rauhamaa writes: > "Frank Millman" : >> 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.