Skip to content

Commit 183c90f

Browse files
committed
refactor(runtime): move BuildReadyRejection above the Promise.all comment
The comment documents createSettledTracker; keep the class from sitting between them.
1 parent 5cdc6c7 commit 183c90f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/core/src/runtime/init.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ function samePromiseSet(a: PromiseLike<unknown>[], b: PromiseLike<unknown>[] | n
247247
return b !== null && a.length === b.length && a.every((p, i) => p === b[i]);
248248
}
249249

250-
// `Promise.all` allocates a fresh promise every call, so comparing ITS
251-
// identity across repeat polls is never stable — that re-arms a `.then()`
252-
// on every poll and never lets the caller observe "settled", even once the
253-
// underlying work is done. Compares the source promises themselves instead.
254250
class BuildReadyRejection extends Error {
255251
constructor(
256252
readonly key: string,
@@ -260,6 +256,10 @@ class BuildReadyRejection extends Error {
260256
}
261257
}
262258

259+
// `Promise.all` allocates a fresh promise every call, so comparing ITS
260+
// identity across repeat polls is never stable — that re-arms a `.then()`
261+
// on every poll and never lets the caller observe "settled", even once the
262+
// underlying work is done. Compares the source promises themselves instead.
263263
function createSettledTracker(
264264
collectPromises: () => PromiseLike<unknown>[],
265265
onSettled: () => void,

0 commit comments

Comments
 (0)