You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#We use this to track the tasks that are currently running
483
483
#We dont need this to be ConcurrentList because we only manipulate it in the "main" runspace.
484
-
[List[Task[String]]]$currentTasks=@()
484
+
[List[Task]]$currentTasks=@()
485
485
486
486
#This is used to track the highest candidate if -Update was specified to force a remote lookup. If the candidate is still the most valid after remote lookup we can skip it without hitting disk to read the manifest again.
@@ -1368,6 +1371,8 @@ function Get-ModuleInfoAsync {
1368
1371
1369
1372
if ($requestTask) {
1370
1373
Write-Debug"REQUEST CACHE HIT for $Uri"
1374
+
#HACK: We need the task to be a unique reference for the context mapping that occurs later on, so this is an easy if obscure way to "clone" the task using PowerShell.
1375
+
$requestTask= [Task]::WhenAll($requestTask)
1371
1376
} else {
1372
1377
Write-Debug ('{0}fetch info from {1}'-f ($ModuleId?"$ModuleId`: " : ''),$uri)
0 commit comments