File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,11 @@ $jobRows = $queriesToCheck | ForEach-Object -ThrottleLimit $NumThreads -Parallel
299
299
300
300
foreach ($testDirectory in $testDirs ){
301
301
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
+
302
307
# for the report
303
308
$row = @ {
304
309
" SUITE" = $CurrentSuiteName ;
@@ -412,6 +417,8 @@ $jobRows = $queriesToCheck | ForEach-Object -ThrottleLimit $NumThreads -Parallel
412
417
# output current row state
413
418
$row
414
419
420
+ # release any held mutexes
421
+ $Mutex.ReleaseMutex ();
415
422
416
423
# ##########################################################
417
424
# ##########################################################
@@ -423,6 +430,8 @@ $jobRows = $queriesToCheck | ForEach-Object -ThrottleLimit $NumThreads -Parallel
423
430
}
424
431
}
425
432
# go to next row
433
+
434
+
426
435
}
427
436
428
437
# combine the outputs
You can’t perform that action at this time.
0 commit comments