We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bae4c9b commit 8b14379Copy full SHA for 8b14379
tools/GenerateModules.ps1
@@ -92,7 +92,8 @@ $AutoRestTempFolder | ForEach-Object {
92
}
93
94
$Stopwatch = [system.diagnostics.stopwatch]::StartNew()
95
-$Throttle = 2 # Reduced from 4 to prevent file locking issues in parallel module generation
+$CpuCount = (Get-CimInstance Win32_Processor).NumberOfLogicalProcessors
96
+$Throttle = [math]::Min(4, $cpuCount / 2) # Use half the CPU count but max 4
97
$Results = $ModuleToGenerate | ForEach-Object -Parallel {
98
$Module = $_
99
Write-Host -ForegroundColor Green "-------------'Generating $Module'-------------"
0 commit comments