The current shutdown zipper attempts to provide deterministic behaviour in:
exitCode.join()
aggregateChannel().consumeEach{}
runningProcess.join()
but the problem seems to be that resuming coroutines is intrinsically tough to make deterministic. There is both a knowledge-problem and a tech problem here.
- determine if there is a sufficient way to collect the above calls and dispatch them in some kind of known order without a messy blocking system
- replace shutdown zipper with something that doesn't use locks.