MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / race

Function race

Extension/src/Utility/Async/iterators.ts:174–177  ·  view source on GitHub ↗
(promises: Promise<any>[])

Source from the content-addressed store, hash-verified

172 * By using this race function instead, we can ignore those (the v8 JIT will easily optimize this out in production)
173 */
174export function race(promises: Promise<any>[]): Promise<any> {
175 const addMisbehavingPromise: <T>(p: Promise<T>) => Promise<T> = (global as any).addMisbehavingPromise;
176 return addMisbehavingPromise ? addMisbehavingPromise(Promise.race(promises)) : Promise.race(promises);
177}

Callers 1

combinerFunction · 0.85

Calls 1

addMisbehavingPromiseFunction · 0.85

Tested by

no test coverage detected