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

Method unsafeDone

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

Source from the content-addressed store, hash-verified

192 return this.done(core.exitFailCause(cause))
193 }
194 unsafeDone(exit: Exit<void, E>): boolean {
195 if (this.state._tag !== "Open") {
196 return false
197 } else if (this.state.offers.size === 0 && this.messages.length === 0 && this.messagesChunk.length === 0) {
198 this.finalize(exit)
199 return true
200 }
201 this.state = { ...this.state, _tag: "Closing", exit }
202 return true
203 }
204 shutdown: Effect<boolean> = core.sync(() => {
205 if (this.state._tag === "Done") {
206 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
Client.test.tsFile · 0.80
onEndFunction · 0.80
onErrorFunction · 0.80
onCloseFunction · 0.80

Calls 1

finalizeMethod · 0.95

Tested by

no test coverage detected