🌞
As someone who's not done anything with dagger before, I was reading the documentation on services when I found an interesting situation. The Go start-stop-services example defers shutting redis down, then does operations with the container. Makes sense.
The TypeScript version of this awaits shutting redis down, then does operations with it. To me this looked wrong, and I was sure it was an incorrect translation of the Go example. But I ran this locally and it works! It works just the same if I rewrite it into the notionally proper form, where everything after await redisSrv.start() is wrapped in a try, with a finally that calls await redisSrv.stop().
What gives? Why does the example as it exists right now work? Is this some weird race that just so happens to work out?