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

Function awaitNext

Extension/src/Utility/Async/iterators.ts:96–100  ·  view source on GitHub ↗
(element: Cursor<T>)

Source from the content-addressed store, hash-verified

94 return result;
95
96 async function awaitNext(element: Cursor<T>): Promise<Cursor<T>> {
97 element.result = undefined; // drop the previous result before awaiting the next
98 element.result = await element.iterator.next();
99 return element;
100 }
101
102 async function* combiner(iterables: Some<T>[]) {
103 iterables.forEach((iterable, index) => iterators.set(index, awaitNext({ identity: index, iterator: asyncOf(iterable)[Symbol.asyncIterator]() })));

Callers 2

accumulatorFunction · 0.85
combinerFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected