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(
17921792 return ;
17931793 }
17941794
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" );
17951798 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)) {
17981800 swift_task_dealloc (record);
17991801 }
18001802}
You can’t perform that action at this time.
0 commit comments