MCPcopy
hub / github.com/statelyai/xstate / _stop

Method _stop

packages/core/src/createActor.ts:631–643  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

629 }
630
631 private _stop(): this {
632 if (this._processingStatus === ProcessingStatus.Stopped) {
633 return this;
634 }
635 this.mailbox.clear();
636 if (this._processingStatus === ProcessingStatus.NotStarted) {
637 this._processingStatus = ProcessingStatus.Stopped;
638 return this;
639 }
640 this.mailbox.enqueue({ type: XSTATE_STOP } as any);
641
642 return this;
643 }
644
645 /** Stops the Actor and unsubscribe all listeners. */
646 public stop(): this {

Callers 2

stopMethod · 0.95
constructorMethod · 0.80

Calls 2

clearMethod · 0.80
enqueueMethod · 0.80

Tested by

no test coverage detected