Move suspension into operation guard (#99053)
So in some testing I found a rare error where a child task could take the suspend point, causing it to decrement the counter even though it hadn't incremented it. Move this operation to the guard makes this not impossible (you can still just grab the coordinator) but at least in this code path makes it unlikely you do this. It fixes the bug I found. Discussed this with Luke. We agreed trying to recreate the case in a unit test would probably be a bit overkill.
Showing
Please
register
or
sign in
to comment