How to use the @most/core.propagateEndTask function in @most/core

To help you get started, we’ve selected a few @most/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mostjs / core / packages / virtual-stream / src / toStream.js View on Github external
const finish = (vstream, sink, scheduler, tasks) => {
  if (vstream instanceof Finite) {
    tasks.push(scheduler.delay(vstream.time, propagateEndTask(sink)))
  } else if (vstream instanceof Errored) {
    tasks.push(scheduler.delay(vstream.time, propagateErrorTask(vstream.error, sink)))
  }

  return disposeWith(cancelAll, tasks)
}