diff --git a/common/changes/@microsoft/rush/sennyeya-weighting-bug-fix_2024-05-08-13-35.json b/common/changes/@microsoft/rush/sennyeya-weighting-bug-fix_2024-05-08-13-35.json new file mode 100644 index 00000000000..2ce2f9ab35c --- /dev/null +++ b/common/changes/@microsoft/rush/sennyeya-weighting-bug-fix_2024-05-08-13-35.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fixes a bug where cobuilds would cause a GC error when waiting for long periods of time.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/libraries/rush-lib/src/logic/operations/AsyncOperationQueue.ts b/libraries/rush-lib/src/logic/operations/AsyncOperationQueue.ts index 4d0ad5b88c9..95cda7813e8 100644 --- a/libraries/rush-lib/src/logic/operations/AsyncOperationQueue.ts +++ b/libraries/rush-lib/src/logic/operations/AsyncOperationQueue.ts @@ -17,7 +17,7 @@ export const UNASSIGNED_OPERATION: 'UNASSIGNED_OPERATION' = 'UNASSIGNED_OPERATIO export type IOperationIteratorResult = | OperationExecutionRecord - | { weight: 0; status: typeof UNASSIGNED_OPERATION }; + | { weight: 1; status: typeof UNASSIGNED_OPERATION }; /** * Implementation of the async iteration protocol for a collection of IOperation objects. @@ -166,7 +166,7 @@ export class AsyncOperationQueue // remote executing operation which is not ready to process. if (queue.some((operation) => operation.status === OperationStatus.RemoteExecuting)) { waitingIterators.shift()!({ - value: { weight: 0, status: UNASSIGNED_OPERATION }, + value: { weight: 1, status: UNASSIGNED_OPERATION }, done: false }); }