Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit908ab16

Browse files
committed
Fix fordotnet#113 - Async.Sleep in .NETCore profiles does not invoke error continuation (changeset 1305124)
1 parent8d21149 commit908ab16

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/fsharp/FSharp.Core/control.fs‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,8 +1474,13 @@ namespace Microsoft.FSharp.Control
14741474
static memberSleep(dueTime:int):Async<unit>=
14751475
// use combo protectedPrimitiveWithResync + continueWith instead of AwaitTask so we can pass cancellation token to the Delay task
14761476
unprotectedPrimitiveWithResync(fun({aux=aux}asargs)->
1477-
TaskHelpers.continueWithUnit(Task.Delay(dueTime, aux.token), args)
1478-
)
1477+
let mutablethe_exn=null
1478+
lettask=try Task.Delay(dueTime, aux.token)
1479+
with e-> the_exn<- e;null
1480+
match the_exnwith
1481+
|null-> TaskHelpers.continueWithUnit(task, args)
1482+
| e-> aux.econt e
1483+
)
14791484
#else
14801485
static memberSleep(dueTime):Async<unit>=
14811486
unprotectedPrimitiveWithResync(fun({aux=aux}asargs)->

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp