There is no operation on `SendChannel` for that (i...
# coroutines
e
There is no operation on
SendChannel
for that (it is hard to consistently define for an arbitrary
SendChannel
), but parent job gives that too. You can do:
Copy code
val parent = Job()
val actor1 = actor(parent = parent) { ... }
...
val actorN = actor(parent = parent) { ... }
...
parent.cancelAndJoin() // cancel all actors and wait for all of them to complete