on one console type
$ python scpi_serial_server.py
this creates a simulated serial line. the address is /tmp/roadrunner
on another console execute one of the two python gevent examples:
$ python gevent_serial_filedescriptor.py
RoadRunner, ACME Inc., v1013, 234567
Done at 18!
The important thing to notice on both examples is that the output Done at <X>!
is bigger
than 0 infering that the other gevent task was able to run concurrently with the slow read
of the simulated serial line.
See also this great post on serial line with python asyncio