Basic asyncio usage

Marko Rauhamaa marko at pacujo.net
Mon Nov 24 11:26:30 EST 2014


Benjamin Risher <brisher777 at gmail.com>:

> I was wondering if you ever made progress with your asyncio project.
> I'm currently digging around for examples and reference material and
> came across your post.
>
> I'd be interested in any tips/gotchas/examples you'd be willing to
> provide as far as asyncio.

Here's an implementation of the classic Dining Philosophers problem:

   <URL: http://pacujo.net/~marko/philosophers.py>

The main object of the example is to see how multiple inputs can be
multiplexed using asyncio.wait(FIRST_COMPLETED).


Marko



More information about the Python-list mailing list