mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-12 02:58:53 -06:00
There is a bug at the moment when you try to resolve more than 1 Promise returned from next() at the same time, e.g., const list = new NomsList([1, 2, 3]); const iter = list.iterator(); const n1 = iter.next(); const n2 = iter.next(); console.log(Promise.all(n1, n2)); It will not print "[1, 2]" as you'd expect, but instead "[1, 1]". This was caused by an artificial race condition in the async/await pattern used in the AsyncIterator next() implementations.