7 ms·
> Is there any benefit to making this [compute_pi_digits()] function awaitable? If you introduce suspension points in that (e.g. every 100 computed digits), th
by kaeso 8y ago
> Is there any benefit to making this [compute_pi_digits()] function awaitable?
If you introduce suspension points in that (e.g. every 100 computed digits), then you can co-schedule other tasks (e.g. a similar `compute_phi_digits`) or handle graceful cancellation (e.g. if a deadline is exceeded, or its parent task aborted in the meanwhile).