Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #103258
| 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 | Sat, 20 Feb 2016 20:02:18 +1100 |
| Lines | 20 |
| Message-ID | <mailman.19.1455958942.13884.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> <mailman.173.1455636082.22075.python-list@python.org> <87r3gc608i.fsf@elektro.pacujo.net> <871t877ru6.fsf@jester.gateway.pace.com> <87oabbpzoo.fsf@elektro.pacujo.net> <87twl36amj.fsf@jester.gateway.pace.com> <mailman.18.1455958339.13884.python-list@python.org> <87io1jpxjw.fsf@elektro.pacujo.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de H16zaax/osHEA9V7JP5/VQOj8tZIx421XdGpklM8eHIQ== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'skip:/ 10': 0.07; 'cc:addr:python-list': 0.09; 'caching,': 0.09; 'lookup': 0.09; 'python': 0.10; 'itself.': 0.11; 'server,': 0.15; '2016': 0.16; 'caches': 0.16; 'caching': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hacked': 0.16; 'ignores': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:run': 0.16; 'sure.': 0.16; 'wrote:': 0.16; 'library': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'feb': 0.23; 'sat,': 0.23; 'written': 0.24; 'header:In-Reply-To:1': 0.24; '(which': 0.26; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; 'entries': 0.27; 'regular': 0.29; 'server.': 0.30; "can't": 0.32; 'server': 0.34; 'gives': 0.35; 'received:google.com': 0.35; 'on,': 0.35; 'generic': 0.35; 'mine': 0.35; 'but': 0.36; 'instead': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'goes': 0.39; 'subject:the': 0.39; 'where': 0.40; 'notified': 0.62; 'capable': 0.65; '20,': 0.66; 'situation': 0.67; 'chrisa': 0.84; 'depended': 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=DJubSiGorB13shn1TqX5NR+wg1YW14iRQdRKIPQC6Do=; b=Jkz/dxPicI4UUd18MrERQ/9E07CvOsque/1DDEAClsRwpHdsISwAcp2GbxRS2ttb3X U5Yz/VRqpdyBTX5VqUvpCStebgZ31fDFLrOi4g8oZa7wrMJ/+61FqvT1Onth5dxCIA+v mGmUd+rA5VsOKq/+NzvAN7EWzmupQXwUzdjnIG/27SEEnf4iRPBgo0kUpgUu1/krXKHv AVPOxSdWmu66FtuyG9LGkqy2JdFllgxqZySr0iS+K8K/zgH+CKPa33fL9vSv8IFMxnIl fIUVlG0VSQeHYfqdDb2nELQwl8MfMGzQlkfwX+XCP18YH3rBNdCGrls+alQqNmgOslhP +j8w== |
| 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=DJubSiGorB13shn1TqX5NR+wg1YW14iRQdRKIPQC6Do=; b=jcpOFWf8wVjhZ9PnziGObkS+Klk2oi+TSJOHBlnH6Si4zD1CvohxTKj0LxLNM4gXl+ 72Dlp1oYwNMZ4SmlxX/2H6E5rAug8HkYXdsbvuSInfNZM3Vp17m+bHFQCXsFgYyC6Btx OBQ+uThlaC1EQY3vmEvSowTrF73tPAdEC5SSp2IWIwA50cOLiHikD62XVx0lFKII5moW m30Eiu5S36EZzEwwkew7eaDy7+jUcaluvaUHb64q4wUWnmhJByj587TDEMqko1pPcGGq AJSiAKfTtsN9OY2Q3/YbfeDBP44Lopwkx2nQWNY+X8W0T4fuoZb86nt1bKy6aTQjOLcT RNpQ== |
| X-Gm-Message-State | AG10YOSs6PuAc98Txb0meNw2wOuYt9nFW7G9YrUnUfTOPU/j3lTXS6v+jLo/ZiYRWqZpL1q4HP+OksDy0vLMxg== |
| X-Received | by 10.107.47.162 with SMTP id v34mr17197227iov.19.1455958939118; Sat, 20 Feb 2016 01:02:19 -0800 (PST) |
| In-Reply-To | <87io1jpxjw.fsf@elektro.pacujo.net> |
| 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:103258 |
Show key headers only | View raw
On Sat, Feb 20, 2016 at 7:59 PM, Marko Rauhamaa <marko@pacujo.net> wrote: > Chris Angelico <rosuav@gmail.com>: > >> In a (non-Python) program of mine, I got annoyed by synchronous name >> lookups, so I hacked around it: instead of using the regular library >> functions, I just do a DNS lookup directly (which can then be >> event-based - send a UDP packet, get notified when a UDP packet >> arrives). Downside: Ignores /etc/nsswitch.conf and /etc/hosts, and >> goes straight to the name server. Upside: Is able to do its own >> caching, since the DNS library gives me the TTLs, but >> gethostbyname/getaddrinfo won't. > > Ditto in a Python program of mine, although I don't bother with caching: > the DNS server is perfectly capable of caching the entries for me. If you know you have a local DNS server, sure. Mine is written for a generic situation where that can't be depended on, so it caches itself. But it's no big deal. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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