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


Groups > comp.lang.python > #75131

Re: Question about asyncio doc example

From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: Question about asyncio doc example
Date 2014-07-24 10:23 +0300
Organization A noiseless patient Spider
Message-ID <87d2cvmd8u.fsf@elektro.pacujo.net> (permalink)
References <CAO3PiBgEsjvWMMqZkkOUoHmyDQr4=BtprspHj1kw7itOMiZDpw@mail.gmail.com> <lqpjnu$dun$1@ger.gmane.org> <CAO3PiBgduzC32zEvq=v+CjiWecguFuD5VyZWZCXL5PEGCnE-Xg@mail.gmail.com> <mailman.12268.1406185154.18130.python-list@python.org>

Show all headers | View raw


Terry Reedy <tjreedy@udel.edu>:

> 18.5.3. Tasks and coroutines, seems to be devoid of event wait
> examples. However, there is a 'yield from' network example in 18.5.5
> Streams using socket functions wrapped with coroutines. These should
> definitely be used instead of sleep. In fact, for cross-platform
> network code meant to run on *nix and Windows, they are better than
> the unix oriented select and poll functions.

Asyncio has full support for the callback style as well. What I don't
know is how well the two styles mix. Say, you have a module that
produces callbacks and another one that is based on coroutines. The
coroutines can easily emit callbacks but can callbacks call "yield
from"?


Marko

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


Thread

Re: Question about asyncio doc example Terry Reedy <tjreedy@udel.edu> - 2014-07-24 02:58 -0400
  Re: Question about asyncio doc example Marko Rauhamaa <marko@pacujo.net> - 2014-07-24 10:23 +0300
    Re: Question about asyncio doc example Ian Kelly <ian.g.kelly@gmail.com> - 2014-07-24 10:46 -0600
      Re: Question about asyncio doc example Marko Rauhamaa <marko@pacujo.net> - 2014-07-24 20:07 +0300

csiph-web