CodePlexProject Hosting for Open Source Software
let ParallelSample1() = // What will execute on each thread let threadBody() = for i in 1 .. 5 do // Wait 1/10 of a second Thread.Sleep(100) printfn "[Thread %d] %d..." Thread.CurrentThread.ManagedThreadId i let spawnThread() = let thread = new Thread(threadBody) thread.Start() printfn "please check the background console window for output" // Spawn a couple of threads at once spawnThread() spawnThread()
please check the background console window for output
Last edited Sep 14, 2011 at 3:30 AM by ttliu2000, version 1
There is no recommended release for this project.