Packages

object CleanCancellation

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CleanCancellation
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def apply[F[_], A](sinkAndCheckpoint: Pipe[F, A, Nothing])(implicit arg0: Async[F]): Pipe[F, A, Nothing]

    This is the machinery needed to make sure that pending chunks are sunk and checkpointed when the app terminates.

    This is the machinery needed to make sure that pending chunks are sunk and checkpointed when the app terminates.

    The source and sink each run in concurrent streams, so they are not immediately cancelled upon receiving a SIGINT

    The "main" stream just waits for a SIGINT, and then cleanly shuts down the concurrent processes.

    We use a queue as a level of indirection between the stream of transformed events and the sink + checkpointing. When we receive a SIGINT or exception then we terminate the sink by pushing a None to the queue.