MCPcopy Create free account
hub / github.com/denoland/std / raceWithSignal

Function raceWithSignal

async/unstable_pool_settled.ts:140–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 }
139
140 function raceWithSignal(): Promise<unknown> {
141 if (!abortDeferred) return Promise.race(executing);
142 executing.add(abortDeferred.promise);
143 return Promise.race(executing).finally(() => {
144 executing.delete(abortDeferred!.promise);
145 });
146 }
147
148 function settle(fn: () => R | Promise<R>): Promise<Settled> {
149 return Promise.resolve()

Callers 1

pooledMapSettledFunction · 0.85

Calls 2

deleteMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected