This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let atomicValue = CloudAtom.New(42) |> cluster.Run | |
| cloud { | |
| do! | |
| [ for i in 1..n -> cloud { return! CloudAtom.Update (atomicValue , fun i -> i + 1)}] | |
| |> Cloud.Parallel | |
| |> Cloud.Ignore | |
| return! CloudAtom.Read atomicValue | |
| } |> runtime.Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cloud { | |
| let value = ref 0 | |
| Cloud.Parallel [| for i in 1 .. 10000 -> cloud { incr value } |] |> ignore | |
| return !value | |
| } |> runtime.Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async { | |
| let value = ref 0 | |
| let parallel = Async.Parallel [| for i in 1 .. 10000 -> async { incr value } |] | |
| return !value | |
| } |> Async.RunSynchronously |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let cloudVector = CloudVector.New(localArray,1000L) |> runtime.Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cloud { | |
| let! dataFromCloudCell = CloudCell.Read dataInTheCloud | |
| // actions with data | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let dataInTheCloud = localData |> CloudCell.New |> runtime.Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let runtime = MBrace.Boot nodes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let runtime = MBrace.Boot nodeslet runtime = MBrace.Boot(nodes, store = azureStore) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let runtime = Runtime.GetHandle(config) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let config = | |
| { | |
| Configuration.Default with | |
| StorageConnectionString = "<storage connection string>" | |
| ServiceBusConnectionString = "<service bus connection string>" | |
| } |