3 ms·
>I only see his nursery as being useful when you really want your async tasks to complete before the function in which they were dispatched returns. That's far
by coldtea 9y ago
>I only see his nursery as being useful when you really want your async tasks to complete before the function in which they were dispatched returns. That's far from covering every use case of concurrency!
Perhaps, but only having a complex solution that handles 100% of use cases is less desirable than having a simple one that handles 80% of the most common use cases PLUS the ability to go deeper and use the complex method (if, and only if, it's necessary...)
- jeremiep 9y agoAgreed, I'd rather have a few simple constructs, especially if they compose. Still, there's value in unification and generality, at least when the result is simple, even if that covers only 80% of cases. For example you generally run a lot more composable tasks than actual threads and syncs. You get a general, and powerful abstraction for the general case yet threads are still there for more exotic needs.