Skip to content

Commit 576a3cf

Browse files
committed
remove old SRTP hacks
1 parent a6b9406 commit 576a3cf

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

src/IcedTasks/TaskUnit.fs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,8 @@ module TasksUnit =
5858
let step = info.ResumptionFunc.Invoke(&sm)
5959

6060
if step then
61-
#if DEBUG
62-
sm.Data.MethodBuilder.SetResult()
63-
#else
64-
// SRTP fails here for some reason in debug mode
6561
MethodBuilder.SetResult(&sm.Data.MethodBuilder)
66-
#endif
62+
6763
else
6864
match sm.ResumptionDynamicInfo.ResumptionData with
6965
| :? ICriticalNotifyCompletion as awaiter ->
@@ -105,12 +101,8 @@ module TasksUnit =
105101
let __stack_code_fin = code.Invoke(&sm)
106102

107103
if __stack_code_fin then
108-
#if DEBUG
109-
sm.Data.MethodBuilder.SetResult()
110-
#else
111-
// SRTP fails here for some reason in debug mode
112104
MethodBuilder.SetResult(&sm.Data.MethodBuilder)
113-
#endif
105+
114106
with exn ->
115107
__stack_exn <- exn
116108
// Run SetException outside the stack unwind, see https://github.com/dotnet/roslyn/issues/26567
@@ -179,12 +171,8 @@ module TasksUnit =
179171
let __stack_code_fin = code.Invoke(&sm)
180172

181173
if __stack_code_fin then
182-
#if DEBUG
183-
sm.Data.MethodBuilder.SetResult()
184-
#else
185-
// SRTP fails here for some reason in debug mode
186174
MethodBuilder.SetResult(&sm.Data.MethodBuilder)
187-
#endif
175+
188176
with exn ->
189177
__stack_exn <- exn
190178
// Run SetException outside the stack unwind, see https://github.com/dotnet/roslyn/issues/26567

src/IcedTasks/ValueTaskUnit.fs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,7 @@ module ValueTasksUnit =
6060
let step = info.ResumptionFunc.Invoke(&sm)
6161

6262
if step then
63-
#if DEBUG
64-
sm.Data.MethodBuilder.SetResult()
65-
#else
66-
// SRTP fails here for some reason in debug mode
6763
MethodBuilder.SetResult(&sm.Data.MethodBuilder)
68-
#endif
6964
else
7065
match sm.ResumptionDynamicInfo.ResumptionData with
7166
| :? ICriticalNotifyCompletion as awaiter ->
@@ -108,12 +103,8 @@ module ValueTasksUnit =
108103
let __stack_code_fin = code.Invoke(&sm)
109104

110105
if __stack_code_fin then
111-
#if DEBUG
112-
sm.Data.MethodBuilder.SetResult()
113-
#else
114-
// SRTP fails here for some reason in debug mode
115106
MethodBuilder.SetResult(&sm.Data.MethodBuilder)
116-
#endif
107+
117108
with exn ->
118109
__stack_exn <- exn
119110
// Run SetException outside the stack unwind, see https://github.com/dotnet/roslyn/issues/26567

0 commit comments

Comments
 (0)