Monday, May 31, 2010

F# Parallelism: Map=>Parallel=>StartAsTask


Key ---- function called in Map must have async { }

namespace JQD

type Downloader() =

let Download n=
async {
let f=System.IO.File.ReadLines("")
return f
}

member this.DA()=
[|1.100|]
|> Seq.map(fun n->Download n)
|> Async.Parallel
|> Async.StartAsTask

No comments: