MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / stop

Function stop

src/ui/shimmer-progress.ts:102–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 },
101
102 stop() {
103 return new Promise<void>((resolve) => {
104 let settled = false;
105 const finish = (): void => {
106 if (settled) return;
107 settled = true;
108 // Worker has cleared (or been terminated off) the animation line;
109 // persist the final phase's done-line from the main thread.
110 printPhaseDone();
111 resolve();
112 };
113
114 const timeout = setTimeout(() => {
115 worker.terminate().then(finish);
116 }, 2000);
117
118 worker.on('message', (msg: { type: string }) => {
119 if (msg.type === 'stopped') {
120 clearTimeout(timeout);
121 worker.terminate().then(finish);
122 }
123 });
124
125 worker.postMessage({ type: 'stop' });
126 });
127 },
128 };
129}
130

Callers

nothing calls this directly

Calls 4

resolveMethod · 0.80
terminateMethod · 0.65
onMethod · 0.65
postMessageMethod · 0.65

Tested by

no test coverage detected