MCPcopy Index your code
hub / github.com/Effect-TS/effect / offerRemainingSingle

Method offerRemainingSingle

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

Source from the content-addressed store, hash-verified

336 }
337
338 private offerRemainingSingle(message: A) {
339 return core.asyncInterrupt<boolean>((resume) => {
340 if (this.state._tag !== "Open") {
341 return resume(exitFalse)
342 }
343 const entry: OfferEntry<A> = { _tag: "Single", message, resume }
344 this.state.offers.add(entry)
345 return core.sync(() => {
346 if (this.state._tag === "Open") {
347 this.state.offers.delete(entry)
348 }
349 })
350 })
351 }
352 private offerRemainingArray(remaining: Array<A>) {
353 return core.asyncInterrupt<Chunk.Chunk<A>>((resume) => {
354 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