File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1792,9 +1792,11 @@ static void swift_task_removeCancellationHandlerImpl(
1792
1792
return ;
1793
1793
}
1794
1794
1795
+ auto task = swift_task_getCurrent ();
1796
+ assert (task->_private ()._status ().load (std::memory_order_relaxed).getInnermostRecord () == record &&
1797
+ " We expect that the popped record will be exactly first as well as that it is of the expected type" );
1795
1798
if (auto poppedRecord =
1796
- popStatusRecordOfType<CancellationNotificationStatusRecord>(swift_task_getCurrent ())) {
1797
- assert (record == poppedRecord && " The removed record did not match the expected record!" );
1799
+ popStatusRecordOfType<CancellationNotificationStatusRecord>(task)) {
1798
1800
swift_task_dealloc (record);
1799
1801
}
1800
1802
}
You can’t perform that action at this time.
0 commit comments