[Async-sig] New blog post: Notes on structured concurrency, or: Go statement considered harmful
solipsis at pitrou.net
Wed Apr 25 06:17:25 EDT 2018
On Wed, 25 Apr 2018 02:24:15 -0700
Nathaniel Smith <njs at pobox.com> wrote:
> Hi all,
> I just posted another essay on concurrent API design:
> This is the one that finally gets at the core reasons why Trio exists;
> I've been trying to figure out how to write it for at least a year
> now. I hope you like it.
My experience is indeed that something like the nursery construct would
make concurrent programming much more robust in complex cases.
This is a great explanation why.
API note: I would expect to be able to use it this way:
self._nursery = open_nursery()
# Lots of behaviour methods that can put new tasks in the nursery
Also perhaps more finegrained shutdown routines such as:
wait for all tasks to join, cancel the remaining ones
after the given timeout
More information about the Async-sig