fsharp/fsharpx — pull request #33 by 7sharp9 (2012-02-10 00:15:48+00:00)
Title: Added Async extension: TryAwaitTask

Added an Async extension for TryAwaitTask: This returns an option type based on sucessful completion.

/// Starts a Task<'a> with the timeout and cancellationToken and
/// returns a Async containing the result. If the Task does
/// not complete in the timeout interval, or is faulted None is returned.

TryAwaitTask : task:System.Threading.Tasks.Task<'a> * ?timeout:int *
?cancellationToken:System.Threading.CancellationToken ->
Async<'a option>