Status of side-effecting functions in python

Marko Rauhamaa marko at
Tue Oct 28 10:07:14 CET 2014

Nobody <nobody at nowhere.invalid>:

> Asynchronous I/O in the sense of select(), poll(), O_NONBLOCK etc is
> meant for situations where delays could be indefinite, e.g. network
> connections or terminals. For "short" delays (i.e. disc access),
> there's not much point having a mechanism so that you can avoid
> blocking while the data is read from disc just so that you can block
> while the code in the "else" branch is read from disc.

I disagree with the "shortness" of the delays.

> If you want the program to be able to do something else while waiting
> for I/O, use threads. The introduction of threads made most
> concurrency- related issues in the POSIX API moot.

I disagree about that point of view as well. If files played ball with
select() et al, the linux world would be a better, more coherent place.

For example, looking at Python3's asyncio, I don't want to go out of the
asyncio model just because of disk (or DB) access.


More information about the Python-list mailing list