We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 562d7dc commit 0cb39ddCopy full SHA for 0cb39dd
stdlib/public/Concurrency/Task.cpp
@@ -1792,9 +1792,11 @@ static void swift_task_removeCancellationHandlerImpl(
1792
return;
1793
}
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");
1798
if (auto poppedRecord =
- popStatusRecordOfType<CancellationNotificationStatusRecord>(swift_task_getCurrent())) {
- assert(record == poppedRecord && "The removed record did not match the expected record!");
1799
+ popStatusRecordOfType<CancellationNotificationStatusRecord>(task)) {
1800
swift_task_dealloc(record);
1801
1802
0 commit comments