You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
More robust CancelScope misnesting prevention #3329
I think we should probably error here. I took a look at the code and I think the issue is that our CancelScope misnesting prevention only works within a single task -- that is, we don't check that there's no CancelScope currently entered at the end of any task. Unfortunately, IIRC that's hard in that situation to raise an exception with a nice stack trace. As a stopgap, we could raise when exiting the nursery if anything gets marked as misnested. (... which would raise later but should catch all of these misnestings?)
I'm making mostly unsubstantiated conjectures here, based on a few minutes of playing around with the code. There's very likely something I missed!
Activity