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


Groups > comp.lang.python > #102767

Re: Asyncio thought experiment

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From "Sven R. Kunze" <srkunze@mail.de>
Newsgroups comp.lang.python
Subject Re: Asyncio thought experiment
Date Wed, 10 Feb 2016 18:44:14 +0100
Lines 22
Message-ID <mailman.16.1455126257.22075.python-list@python.org> (permalink)
References <87oabqq2a0.fsf@elektro.pacujo.net>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de mjBrQbigBRsZGAfDV4E4MAQBuY5PafKnYzbeQ5ZlA9ZA==
Return-Path <srkunze@mail.de>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.134
X-Spam-Level *
X-Spam-Evidence '*H*': 0.74; '*S*': 0.01; 'so?': 0.07; 'statements': 0.09; 'call?': 0.16; 'cascading': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subroutine': 0.16; 'wrote:': 0.16; 'prevent': 0.20; 'header:In-Reply-To:1': 0.24; 'earlier': 0.27; 'function': 0.28; 'blocking': 0.29; 'implicitly': 0.29; 'statement': 0.32; 'received:10.0': 0.34; 'that,': 0.34; 'best,': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'turn': 0.37; 'front': 0.38; 'why': 0.39; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'charset:windows-1252': 0.62; 'making': 0.62; 'fall': 0.66; 'fact,': 0.67; 'stated': 0.70; 'await': 0.76; 'adorn': 0.84; 'post,': 0.84; 'subject:thought': 0.84; 'victim': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1455126255; bh=5CfA28D6A+Qp3eo0PeoorZRlbEWo4C1dVnFHSLFt62U=; h=Subject:To:References:From:Date:In-Reply-To:From; b=WEX0Blzwjznl+M1SlMV+bwHielvloUP3U2jo3x/UgoNr0Dex1OqfMyG1SpL/oaOq1 xqWiz43CpL2mLx9hTb8avBvfkeavC46i25eLQSuMFSw6ctAldpKGyVGJsqfT8PPy3t +Bg/oI9I8V/f7g09AkIuHjTCEckNuNjiqjoJMdqk=
In-Reply-To <87oabqq2a0.fsf@elektro.pacujo.net>
X-purgate clean
X-purgate This mail is considered clean (visit http://www.eleven.de for further information)
X-purgate-type clean
X-purgate-Ad Categorized by eleven eXpurgate (R) http://www.eleven.de
X-purgate This mail is considered clean (visit http://www.eleven.de for further information)
X-purgate clean
X-purgate-size 934
X-purgate-ID 154282::1455126255-000009F3-EDDA1EAF/0/0
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:102767

Show key headers only | View raw


On 08.02.2016 23:13, Marko Rauhamaa wrote:
> As I stated in an earlier post, a normal subroutine may turn out to be
> blocking. To make it well-behaved under asyncio, you then dutifully tag
> the subroutine with "async" and adorn the blocking statement with
> "await". Consequently, you put "await" in front of all calls to the
> subroutine and cascade the "async"s and "await"s all the way to the top
> level.
>
> Now what would prevent you from making *every* function an "async" and
> "await"ing *every* function call? Then, you would never fall victim to
> the cascading async/await.
>
> And if you did that, why bother sprinkling async's and await's
> everywhere? Why not make every single function call an await implicitly
> and every single subroutine an async? In fact, that's how everything
> works in multithreading: blocking statements don't need to be ornamented
> in any manner.

So? :)

Best,
Sven

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


Thread

Asyncio thought experiment Marko Rauhamaa <marko@pacujo.net> - 2016-02-09 00:13 +0200
  Re: Asyncio thought experiment "Sven R. Kunze" <srkunze@mail.de> - 2016-02-10 18:44 +0100

csiph-web