// tracing: off
import { chain_ } from "../Effect/core"
import { fiberId } from "../Effect/fiberId"
import { interruptAs as effectInterruptAs } from "../Effect/interruption"
import { completeWith } from "./completeWith"
/**
 * Completes the promise with interruption. This will interrupt all fibers
 * waiting on the value of the promise as by the fiber calling this method.
 */

export function interrupt(promise) {
  return chain_(fiberId, (id) => completeWith(effectInterruptAs(id))(promise))
}
//# sourceMappingURL=interrupt.js.map
