Asynchronous I/O, event loop, coroutines and tasks

learn more… | top users | synonyms

0
votes
1answer
31 views

Tornado generator resume on any future in list

Is there a behavior/pattern in tornado (or asyncio) to wait for any instead of all Futures in a list ? yield any_of([future1, future2, future3]) Say future2 is ready then the result should be: ...
12
votes
2answers
146 views

What does self = None do?

I'm reading the source code of the incoming asyncio package. Note that at the end of the method, there is a self = None statement. What does it do? def _run(self): try: ...
1
vote
1answer
35 views

gcc error while installing asyncio backport trollius (Python 2.7.5 and Win7)

I fail to install asyncio backport trollius. From the docs, I have to: "...first build the _overlapped.pyd extension (it will be placed in the asyncio directory):" PS ...
0
votes
2answers
32 views

Why does asyncio.open_connection (or any other coroutine) prevent data_received from processing?

I have the following code slightly modified from the asyncio documentation import asyncio asyncio.tasks._DEBUG = True class EchoServer(asyncio.Protocol): def connection_made(self, transport): ...
0
votes
0answers
31 views

using serial port in python3 asyncio

i'm trying and, so far, failing to use python asyncio to access a serial port. i'd really appreciate any tips on using the new python async framework on a simple fd. Cheers! James
0
votes
1answer
81 views

How can I create a relay server using tulip/asyncio in Python?

I have the example echo server import asyncio class EchoServer(asyncio.Protocol): def connection_made(self, transport): peername = transport.get_extra_info('peername') ...
0
votes
1answer
82 views

Calling coroutines in asyncio.Protocol.data_received

I am having a problem doing asynchronous stuff in the asyncio.Protocol.data_received callback of the new Python asyncio module. Consider the following server: class MathServer(asyncio.Protocol): ...
3
votes
1answer
77 views

maybeDeferred analog with asyncio

I am coding a framework, where the framework will call a user-supplied function. I want to allow the used supplied function to be any of the following: a plain function a function returning ...
3
votes
1answer
632 views

Python asyncio, futures and yield from

Consider the following program (running on CPython 3.4.0b1): import math import asyncio from asyncio import coroutine @coroutine def fast_sqrt(x): future = asyncio.Future() if x >= 0: ...
6
votes
2answers
713 views

Tulip/asyncIO: why not all calls be async and specify when things should be synchronous?

I went to the SF Python meetup when Guido talked about Tulip, the future asyncIO library for asynchronous operations in Python. The take away is that if you want something to be run asynchronously ...