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.
2 parents 50ea777 + 0cb39dd commit 8d72db5Copy full SHA for 8d72db5
stdlib/public/Concurrency/Task.cpp
@@ -1794,9 +1794,11 @@ static void swift_task_removeCancellationHandlerImpl(
1794
return;
1795
}
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");
1800
if (auto poppedRecord =
- popStatusRecordOfType<CancellationNotificationStatusRecord>(swift_task_getCurrent())) {
- assert(record == poppedRecord && "The removed record did not match the expected record!");
1801
+ popStatusRecordOfType<CancellationNotificationStatusRecord>(task)) {
1802
swift_task_dealloc(record);
1803
1804
0 commit comments