Skip to content

Commit 8178deb

Browse files
committed
throttle limit 2
1 parent 8730be9 commit 8178deb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/GenerateModules.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ $AutoRestTempFolder | ForEach-Object {
9292
}
9393

9494
$Stopwatch = [system.diagnostics.stopwatch]::StartNew()
95-
$CpuCount = (Get-CimInstance Win32_Processor).NumberOfLogicalProcessors
96-
$Throttle = [math]::Min(4, $cpuCount / 2) # Use half the CPU count but max 4
95+
$Throttle = 2 # Reduced from 4 to prevent file locking issues in parallel module generation
9796
$Results = $ModuleToGenerate | ForEach-Object -Parallel {
9897
$Module = $_
9998
Write-Host -ForegroundColor Green "-------------'Generating $Module'-------------"

0 commit comments

Comments
 (0)