Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103015

Re: asyncio - run coroutine in the background

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: asyncio - run coroutine in the background
Date Wed, 17 Feb 2016 02:28:46 +1100
Lines 15
Message-ID <mailman.174.1455636529.22075.python-list@python.org> (permalink)
References <mailman.131.1455518141.22075.python-list@python.org> <8737sumpjl.fsf@elektro.pacujo.net> <mailman.132.1455520607.22075.python-list@python.org> <87h9ha8lt0.fsf@jester.gateway.pace.com> <CAPTjJmoWUDfcOe3OCaMK7=zDtW3QzS+7hqUG6DoYZ2AbqzJBUw@mail.gmail.com> <mailman.166.1455628969.22075.python-list@python.org> <87d1rwpwo2.fsf@elektro.pacujo.net> <n9vc4j$n89$1@ger.gmane.org> <CAKF=+dhXZ=yax8STAWr_gjX3Tg8yUjPRJG-7yM2_bRV2Kxm3Jg@mail.gmail.com> <n9vep2$5c7$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de ziSvCZDiejTkTjQSjeVSfAcooouqgXMHmwLJgykgwy7A==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; '(using': 0.07; 'postgresql': 0.07; 'cc:addr:python-list': 0.09; '"but': 0.09; 'wed,': 0.15; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'massively': 0.16; 'processes.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:run': 0.16; 'threads': 0.16; 'wrote:': 0.16; '"you': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; 'seems': 0.23; 'feb': 0.23; 'demonstrate': 0.23; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'switch': 0.27; 'message-id:@mail.gmail.com': 0.27; 'far,': 0.29; 'issues.': 0.29; 'code': 0.30; 'options': 0.33; 'received:google.com': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'thought': 0.37; 'received:209': 0.38; 'subject:the': 0.39; 'where': 0.40; 'more': 0.63; 'worth': 0.67; 'frank': 0.72; 'chrisa': 0.84; 'divergent': 0.84; 'to:none': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=0qhzc5OsQPleAGLbKE2BVkPxalDdwsSyeH7pbVuaQBc=; b=McY5Y2Y0fAgxz/r0ly3pSy5RFfV5ltzJsOeZ7nF9K5OWfRETLgOr2P2YtVl7Y3LAYZ wzBSUNGEEm7yIP6LrA9rs1rXqihds4PEomns8fJuohH1i8pXrv3+9C0Jx2dVy6y8D0Rb mDI5IwS/SFKafDRvbLWusYkLnYmgRm6KUsdUYxTxmaf/YT3sIL4towse+1yFSNBrg2FG /C7sTDrz3UsIGh6muteRY41Tw677uZzmBxki6xiuNbcva+YXYVIXevgblMenkfar7wlg Dwmty0eaVFyucEYzhkCKy1F+QjNej+1gQtLqZrEsF4jgNJfwdbtXinDGPEe3yxRJMUGH RGkA==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type; bh=0qhzc5OsQPleAGLbKE2BVkPxalDdwsSyeH7pbVuaQBc=; b=E+RnQPZVb5nWnzn0SoX15UmwLO3hKEBcy93m+OaL2MTsh+8JKXPktyOq2cN3rxqzPh QyMvYG59poGCHtoBVhpDH5jakW6pDuFPHCpXCpFM+Hm3AvO/3QwdbSXHqsATl7Gl3ipN yYAEkS7wIpqD/HfHzbrIYzkmyC5NGxA2EtLeZ4e8m/dVoMOPHhBFSTBb6x4dQ+loMkfG DbtY68Vh0wHC8GTdG3/TmgW/URq+b6PRQHJ2JLLuh2FmJs+fvOp7SxTmehrVqdzFqTxk Y3wRijEd+I5lvhZD4X0vwQ9dia/cVbszqgYMCkW1LOMgevk8sf1eGDxlA6UzO2CYjiS0 YIug==
X-Gm-Message-State AG10YOQ07s037SsiqDzCOACgbX9V7ljm0pznzkhU1VTXfZmATLvXiQERV1+08tHx3wux4dufZz/XQNKhbbdtAw==
X-Received by 10.50.176.195 with SMTP id ck3mr19570816igc.94.1455636526173; Tue, 16 Feb 2016 07:28:46 -0800 (PST)
In-Reply-To <n9vep2$5c7$1@ger.gmane.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21rc2
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:103015

Show key headers only | View raw


On Wed, Feb 17, 2016 at 2:21 AM, Frank Millman <frank@chagford.com> wrote:
> I would love to drive the database asynchronously, but of the three
> databases I use, only psycopg2 seems to have asyncio support. As my
> home-grown solution (using queues) seems to be working well so far, I am
> sticking with that until I start to experience responsiveness issues. If
> that happens, my first line of attack will be to switch from threads to
> processes.

And this is where we demonstrate divergent thought processes. *My*
first line of attack if hybrid async/thread doesn't work would be to
mandate a PostgreSQL backend, not to switch to hybrid async/process :)
Is the added value of "you get three options of database back-end"
worth the added cost of "but now my code is massively more complex"?

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

asyncio - run coroutine in the background "Frank Millman" <frank@chagford.com> - 2016-02-15 08:35 +0200
  Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-15 08:54 +0200
    Re: asyncio - run coroutine in the background "Frank Millman" <frank@chagford.com> - 2016-02-15 09:16 +0200
      Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-15 09:34 +0200
      Re: asyncio - run coroutine in the background Paul Rubin <no.email@nospam.invalid> - 2016-02-14 23:39 -0800
        Re: asyncio - run coroutine in the background "Frank Millman" <frank@chagford.com> - 2016-02-15 10:17 +0200
        Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-15 13:05 +0200
        Re: asyncio - run coroutine in the background Chris Angelico <rosuav@gmail.com> - 2016-02-16 16:51 +1100
        Re: asyncio - run coroutine in the background Kevin Conway <kevinjacobconway@gmail.com> - 2016-02-16 13:22 +0000
          Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-16 16:17 +0200
            Re: asyncio - run coroutine in the background "Frank Millman" <frank@chagford.com> - 2016-02-16 16:36 +0200
            Re: asyncio - run coroutine in the background Kevin Conway <kevinjacobconway@gmail.com> - 2016-02-16 14:54 +0000
            Re: asyncio - run coroutine in the background Steven D'Aprano <steve@pearwood.info> - 2016-02-17 02:17 +1100
              Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-16 19:12 +0200
                Re: asyncio - run coroutine in the background Paul Rubin <no.email@nospam.invalid> - 2016-02-17 20:38 -0800
                Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-18 08:10 +0200
              Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-16 19:13 +0200
              Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-16 19:14 +0200
              Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-16 19:15 +0200
                Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-16 19:15 +0200
                Re: asyncio - run coroutine in the background Robin Becker <robin@reportlab.com> - 2016-02-16 17:52 +0000
            Re: asyncio - run coroutine in the background "Frank Millman" <frank@chagford.com> - 2016-02-16 17:21 +0200
              Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-16 19:20 +0200
                Re: asyncio - run coroutine in the background Paul Rubin <no.email@nospam.invalid> - 2016-02-19 23:40 -0800
                Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-20 10:13 +0200
                Re: asyncio - run coroutine in the background Paul Rubin <no.email@nospam.invalid> - 2016-02-20 00:37 -0800
                Re: asyncio - run coroutine in the background Chris Angelico <rosuav@gmail.com> - 2016-02-20 19:52 +1100
                Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-20 10:59 +0200
                Re: asyncio - run coroutine in the background Chris Angelico <rosuav@gmail.com> - 2016-02-20 20:02 +1100
                Re: asyncio - run coroutine in the background Marko Rauhamaa <marko@pacujo.net> - 2016-02-20 11:28 +0200
                Re: asyncio - run coroutine in the background Kevin Conway <kevinjacobconway@gmail.com> - 2016-02-20 13:52 +0000
                Re: asyncio - run coroutine in the background "Martin A. Brown" <martin@linux-ip.net> - 2016-02-20 09:45 -0800
                Re: asyncio - run coroutine in the background Chris Angelico <rosuav@gmail.com> - 2016-02-21 08:47 +1100
            Re: asyncio - run coroutine in the background Chris Angelico <rosuav@gmail.com> - 2016-02-17 02:28 +1100
            Re: asyncio - run coroutine in the background "Frank Millman" <frank@chagford.com> - 2016-02-16 17:45 +0200
        Re: asyncio - run coroutine in the background "Frank Millman" <frank@chagford.com> - 2016-02-16 15:52 +0200

csiph-web