title: F# Async completion source?
body: <p>I want an <code>async</code> to wait for a value to be provided. C# has a mechanism for doing this in tasks, but I am using <code>async</code>.</p>
  <p>Here is what I came up with:</p>
  <pre class="lang-ml prettyprint-override"><code>type AsyncCompletionSource&lt;'t&gt;() =
    let tcs = TaskCompletionSource&lt;'t&gt;()
  
    with
      member this.Set(x : 't) =
        tcs.SetResult(x)
  
      member this.Get 
        with get () = 
          Async.AwaitTask tcs.Task
  </code></pre>
  <p>I was wondering if there is something already provided for this in F#?</p>
  <p>And if not, is there a way to accomplish this without jumping in and out of <code>task</code>?</p>
  <hr />
  <p>Also called: future, promise, settable future, subject</p>