Summary
OnBegin<override>()<suspends> : void =
race:
Sleep(5.0)
Func_Sync() # Gets canceled.
# Nested concurrent expression "leaks" after race finishes.
sync:
loop:
Print("Sync")
Sleep(1.0)
Sleep(Inf)
Print("Done")
Sleep(Inf) # The expected result occurs if we remove this line.
Func_Sync<private>()<suspends> : void =
loop:
Print("Sync Func")
Sleep(1.0)
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
Run the code above
Expected Result
“Sync” and “Sync Func” should not print after the 5 seconds
Observed Result
“Sync” continues to print
Platform(s)
PC
Additional Notes
It seems that the lifetime of the concurrent expression is tied to the function scope, rather than its immediate enclosing scope.