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(
17941794 return ;
17951795 }
17961796
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" );
17971800 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)) {
18001802 swift_task_dealloc (record);
18011803 }
18021804}
You can’t perform that action at this time.
0 commit comments