Skip to content

Instantly share code, notes, and snippets.

@michael-newton-15below
Last active December 11, 2015 07:19
Show Gist options
  • Save michael-newton-15below/4565937 to your computer and use it in GitHub Desktop.
Save michael-newton-15below/4565937 to your computer and use it in GitHub Desktop.
Example audit { }
let agent =
AutoCancelAgent.Start(fun inbox -> async {
while true do
audit {
use! client = audit { return getClient () }
Log "Checking email..."
do! audit { return CollectMessages client }
expunge client
} |> doAuditedProcess
do! Async.Sleep(match pollInterval with Interval s -> s)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment