In trio, how can I have a background task that lives as long as my object does?
Excellent question! One of Trio’s weirdest, most controversial decisions is that it takes the position that the existence of a background task is not an implementation detail, and should be exposed as part of your API. On balance I think this is the right decision, but it’s definitely a bit experimental and has some trade-offs. … Read more