MCPcopy Create free account
hub / github.com/Effect-TS/effect / offerRemainingSingle

Method offerRemainingSingle

packages/effect/src/internal/mailbox.ts:343–356  ·  view source on GitHub ↗
(message: A)

Source from the content-addressed store, hash-verified

341 }
342
343 private offerRemainingSingle(message: A) {
344 return core.asyncInterrupt<boolean>((resume) => {
345 if (this.state._tag !== "Open") {
346 return resume(exitFalse)
347 }
348 const entry: OfferEntry<A> = { _tag: "Single", message, resume }
349 this.state.offers.add(entry)
350 return core.sync(() => {
351 if (this.state._tag === "Open") {
352 this.state.offers.delete(entry)
353 }
354 })
355 })
356 }
357 private offerRemainingArray(remaining: Array<A>) {
358 return core.asyncInterrupt<Chunk.Chunk<A>>((resume) => {
359 if (this.state._tag !== "Open") {

Callers 1

offerMethod · 0.95

Calls 3

syncMethod · 0.80
resumeFunction · 0.70
addMethod · 0.65

Tested by

no test coverage detected