4 ms·
No, but it does mean that primitives in trio can be awaited in the same way than any async primitive instead of using a callback. I get that scoping trough nur
by BiteCode_dev 5y ago
No, but it does mean that primitives in trio can be awaited in the same way than any async primitive instead of using a callback.
I get that scoping trough nurseries is the trio selling point, but you do need to have the ability to run something "before" and "after" a lone async call, and I don't want to have to write a "with" block to wrap any single thing that I wish to await.
By having "await" as a universal construct, we allow trio (or anything really) to offer an additional level of granularity - scoping a group of async calls - without losing the smaller one: scoping a single call.