| ... | ... | @@ -566,10 +566,8 @@ const GroupClosure = struct { |
| 566 | 566 | const reset_event: *ResetEvent = @ptrCast(&group.context); |
| 567 | 567 | if (@cmpxchgStrong(CancelId, &closure.cancel_tid, .none, tid, .acq_rel, .acquire)) |cancel_tid| { |
| 568 | 568 | assert(cancel_tid == .canceling); |
| 569 | | // We already know the task is canceled before running the callback. Since all closures |
| 570 | | // in a Group have void return type, we can return early. |
| 571 | | syncFinish(group_state, reset_event); |
| 572 | | return; |
| 569 | // Even though we already know the task is canceled, we must still |
| 570 | // run the closure in case there are side effects. |
| 573 | 571 | } |
| 574 | 572 | current_closure = closure; |
| 575 | 573 | gc.func(group, gc.contextPointer()); |