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 @@ -1794,9 +1794,11 @@ static void swift_task_removeCancellationHandlerImpl(
1794
1794
return ;
1795
1795
}
1796
1796
1797
+ auto task = swift_task_getCurrent ();
1798
+ assert (task->_private ()._status ().load (std::memory_order_relaxed).getInnermostRecord () == record &&
1799
+ " We expect that the popped record will be exactly first as well as that it is of the expected type" );
1797
1800
if (auto poppedRecord =
1798
- popStatusRecordOfType<CancellationNotificationStatusRecord>(swift_task_getCurrent ())) {
1799
- assert (record == poppedRecord && " The removed record did not match the expected record!" );
1801
+ popStatusRecordOfType<CancellationNotificationStatusRecord>(task)) {
1800
1802
swift_task_dealloc (record);
1801
1803
}
1802
1804
}
You can’t perform that action at this time.
0 commit comments