File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,6 +299,11 @@ $jobRows = $queriesToCheck | ForEach-Object -ThrottleLimit $NumThreads -Parallel
299299
300300 foreach ($testDirectory in $testDirs ){
301301
302+ Write-Host " Aquiring lock for $testDirectory "
303+ $Mutex = New-Object - TypeName System.Threading.Mutex - ArgumentList $false , (" __Matrix_" + $testDirectory.Replace (" \" , " _" ));
304+ $Mutex.WaitOne () | Out-Null ;
305+ Write-Host " Locked $testDirectory "
306+
302307 # for the report
303308 $row = @ {
304309 " SUITE" = $CurrentSuiteName ;
@@ -412,6 +417,8 @@ $jobRows = $queriesToCheck | ForEach-Object -ThrottleLimit $NumThreads -Parallel
412417 # output current row state
413418 $row
414419
420+ # release any held mutexes
421+ $Mutex.ReleaseMutex ();
415422
416423 # ##########################################################
417424 # ##########################################################
@@ -423,6 +430,8 @@ $jobRows = $queriesToCheck | ForEach-Object -ThrottleLimit $NumThreads -Parallel
423430 }
424431 }
425432 # go to next row
433+
434+
426435}
427436
428437# combine the outputs
You can’t perform that action at this time.
0 commit comments