Asynchronous programming

Ethan Furman ethan at stoneleaf.us
Sat Aug 13 21:20:47 EDT 2016


On 08/11/2016 10:47 PM, Paul Rudin wrote:
> Steven D'Aprano writes:

[...]

>> In this case, all the work is pure computation, so I don't expect to save
>> any time by doing this, because the work is still all being done in the
>> same process/thread, not in parallel. It may even take a little bit longer,
>> due to the overhead of switching from one to another.
>
> Yeah - you're not gaining anything here. All (?) the interesting use
> cases involve waiting for something (e.g. disk access, network
> communication, separate process) before you can proceed with your
> computation.

The obvious exception being a UI remaining responsive to the user while the calculation is processing.

--
~Ethan~



More information about the Python-list mailing list