Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Async.Parallel calls Seq.toArray twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
sayurin committed May 27, 2013
1 parent 03e548b commit 5ab2403
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/fsharp/FSharp.Core/control.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1338,8 +1338,6 @@ namespace Microsoft.FSharp.Control
if tasks.Length = 0 then args.cont [| |] else // must not be in a 'protect' if we call cont explicitly; if cont throws, it should unwind the stack, preserving Dev10 behavior
protectedPrimitiveCore args (fun args ->
let ({ aux = aux } as args) = delimitSyncContext args // manually resync
let tasks = Seq.toArray l
if tasks.Length = 0 then args.cont [| |] else
let count = ref tasks.Length
let firstExn = ref None
let results = Array.zeroCreate tasks.Length
Expand Down

0 comments on commit 5ab2403

Please sign in to comment.