MCPcopy
hub / github.com/Effect-TS/effect / unsafeDone

Method unsafeDone

packages/effect/src/internal/mailbox.ts:200–209  ·  view source on GitHub ↗
(exit: Exit<void, E>)

Source from the content-addressed store, hash-verified

198 return this.done(core.exitFailCause(cause))
199 }
200 unsafeDone(exit: Exit<void, E>): boolean {
201 if (this.state._tag !== "Open") {
202 return false
203 } else if (this.state.offers.size === 0 && this.messages.length === 0 && this.messagesChunk.length === 0) {
204 this.finalize(exit)
205 return true
206 }
207 this.state = { ...this.state, _tag: "Closing", exit }
208 return true
209 }
210 shutdown: Effect<boolean> = core.sync(() => {
211 if (this.state._tag === "Done") {
212 return true

Callers 15

doneMethod · 0.95
onExitFunction · 0.80
onMessageFunction · 0.80
onMessageErrorFunction · 0.80
onErrorFunction · 0.80
onErrorFunction · 0.80
onMessageFunction · 0.80
onEndFunction · 0.80
onErrorFunction · 0.80
onCloseFunction · 0.80
handleKeypressFunction · 0.80

Calls 1

finalizeMethod · 0.95

Tested by

no test coverage detected