@@ -52,7 +52,7 @@ module ColdTasks =
5252
5353 let inline yieldOnBindLimit () =
5454 ColdTaskCode( fun sm ->
55- if BindDepthCounter .Check() then
55+ if Trampoline.Current .Check() then
5656 let __stack_yield_fin = ResumableCode.Yield() .Invoke(& sm)
5757
5858 if not __ stack_ yield_ fin then
@@ -322,7 +322,7 @@ module ColdTasks =
322322 | InitialYield ->
323323 state <- Running
324324
325- if BindDepthCounter .Check() then
325+ if Trampoline.Current .Check() then
326326 MethodBuilder.AwaitUnsafeOnCompleted(
327327 & sm.Data.MethodBuilder,
328328 Trampoline.Current.AwaiterRef,
@@ -338,7 +338,7 @@ module ColdTasks =
338338 if step then
339339 state <- SetResult
340340
341- if BindDepthCounter .Check() then
341+ if Trampoline.Current .Check() then
342342 // Yield before setting result to prevent stack overflow.
343343 MethodBuilder.AwaitUnsafeOnCompleted(
344344 & sm.Data.MethodBuilder,
@@ -362,7 +362,7 @@ module ColdTasks =
362362 with exn ->
363363 state <- SetException( ExceptionCache.CaptureOrRetrieve exn)
364364
365- if BindDepthCounter .Check() then
365+ if Trampoline.Current .Check() then
366366 // Yield before setting exception to prevent stack overflow.
367367 MethodBuilder.AwaitUnsafeOnCompleted(
368368 & sm.Data.MethodBuilder,
0 commit comments