fork package:unexceptionalio

Mirrors forkIO, but re-throws errors to the parent thread
  • Ignores manual thread kills, since those are on purpose.
  • Re-throws async exceptions (SomeAsyncException) as is.
  • Re-throws ExitCode as is in an attempt to exit with the requested code.
  • Wraps synchronous PseudoException in async ChildThreadError.
Mirrors forkFinally, but since the body is UIO, the thread must terminate successfully or because of PseudoException