[Pkg-cli-apps-commits] [fsharp] 26/60: Fix for #113 - Async.Sleep in .NETCore profiles does not invoke error continuation (changeset 1305124)
Christopher Halse Rogers
raof-guest at moszumanska.debian.org
Sun Sep 14 08:13:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
raof-guest pushed a commit to branch master
in repository fsharp.
commit 908ab16882d92e99146eeeaa641d234a6c5df6fd
Author: latkin <latkin at microsoft.com>
Date: Thu Jul 24 16:57:18 2014 -0700
Fix for #113 - Async.Sleep in .NETCore profiles does not invoke error continuation (changeset 1305124)
---
src/fsharp/FSharp.Core/control.fs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/fsharp/FSharp.Core/control.fs b/src/fsharp/FSharp.Core/control.fs
index 2df2899..9d9bc61 100644
--- a/src/fsharp/FSharp.Core/control.fs
+++ b/src/fsharp/FSharp.Core/control.fs
@@ -1474,8 +1474,13 @@ namespace Microsoft.FSharp.Control
static member Sleep(dueTime : int) : Async<unit> =
// use combo protectedPrimitiveWithResync + continueWith instead of AwaitTask so we can pass cancellation token to the Delay task
unprotectedPrimitiveWithResync ( fun ({ aux = aux} as args) ->
- TaskHelpers.continueWithUnit(Task.Delay(dueTime, aux.token), args)
- )
+ let mutable the_exn = null
+ let task = try Task.Delay(dueTime, aux.token)
+ with e -> the_exn <- e; null
+ match the_exn with
+ | null -> TaskHelpers.continueWithUnit(task, args)
+ | e -> aux.econt e
+ )
#else
static member Sleep(dueTime) : Async<unit> =
unprotectedPrimitiveWithResync (fun ({ aux = aux } as args) ->
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/fsharp.git
More information about the Pkg-cli-apps-commits
mailing list