Skip to content

Instantly share code, notes, and snippets.

@lenadroid
Created May 19, 2015 09:01
Show Gist options
  • Select an option

  • Save lenadroid/a3937f33ea24605ca7de to your computer and use it in GitHub Desktop.

Select an option

Save lenadroid/a3937f33ea24605ca7de to your computer and use it in GitHub Desktop.
let atomicValue = CloudAtom.New(42) |> cluster.Run
let readAtomValue = atomicValue |> CloudAtom.Read |> cluster.Run
cloud {
do!
[ for i in 1..1000 -> cloud { return! CloudAtom.Update (atomicValue, fun i -> i + 1) }]
|> Cloud.Parallel
|> Cloud.Ignore
return! CloudAtom.Read atomicValue
} |> cluster.Run
atomicValue |> CloudAtom.Delete |> cluster.Run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment