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


Groups > comp.lang.python > #102767

Re: Asyncio thought experiment

From "Sven R. Kunze" <srkunze@mail.de>
Newsgroups comp.lang.python
Subject Re: Asyncio thought experiment
Date 2016-02-10 18:44 +0100
Message-ID <mailman.16.1455126257.22075.python-list@python.org> (permalink)
References <87oabqq2a0.fsf@elektro.pacujo.net>

Show all headers | 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