In this snippet, the theoretical resource is not r...
# coroutines
u
In this snippet, the theoretical resource is not released, when the coroutineContext is cancelled before
produce
has been started. Is it possible to avoid this race?
I just realized it's perfectly fine to just move the resource acquisition into the produce block. Rubber-ducked myself again...
s
You might want to take a look at start=ATOMIC
u
But you can't use that with
produce
, right?