"use strict"
Object.defineProperty(exports, "__esModule", { value: true })
exports.interruptJoiner = void 0
const core_1 = require("../Effect/core")
const state_1 = require("./state")
function interruptJoiner(joiner) {
  return (promise) =>
    (0, core_1.succeedWith)(() => {
      const state = promise.state.get
      if (state._tag === "Pending") {
        promise.state.set(
          new state_1.Pending(state.joiners.filter((j) => j !== joiner))
        )
      }
    })
}
exports.interruptJoiner = interruptJoiner
//# sourceMappingURL=interruptJoiner.js.map
