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
Copy file name to clipboardExpand all lines: tests/ParallelTypeCheckingTests/Code/Parallel.fs
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
moduleFSharp.Compiler.Service.Tests.Parallel
1
+
moduleParallelTypeCheckingTests.Parallel
2
2
#nowarn"1182"
3
3
openSystem
4
4
openSystem.Collections.Concurrent
@@ -61,7 +61,7 @@ let processInParallelUsingMailbox
61
61
=
62
62
letprocessedCountLock= Object()
63
63
let mutableprocessedCount=0
64
-
letagent= threadingLimitAgent 10 ct
64
+
letagent= threadingLimitAgent parallelism ct
65
65
let recprocessItem item =
66
66
async{
67
67
let!toSchedule= work item
@@ -70,7 +70,6 @@ let processInParallelUsingMailbox
70
70
toSchedule |> Array.iter (fun x -> agent.Post(Start(processItem x)))
71
71
}
72
72
firstItems |> Array.iter (fun x -> agent.Post(Start(processItem x)))
73
-
()
74
73
75
74
// TODO Could replace with MailboxProcessor+Tasks/Asyncs instead of BlockingCollection + Threads
76
75
// See http://www.fssnip.net/nX/title/Limit-degree-of-parallelism-using-an-agent
0 commit comments