Skip to content

Commit 060260e

Browse files
committed
make use of unreachable
1 parent 376a9a8 commit 060260e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

stdlib/public/Concurrency/TaskGroup.cpp

+2-7
Original file line numberDiff line numberDiff line change
@@ -1349,8 +1349,7 @@ void DiscardingTaskGroup::offer(AsyncTask *completedTask, AsyncContext *context)
13491349
_swift_taskGroup_detachChild(asAbstract(this), completedTask);
13501350
return unlock();
13511351
}
1352-
swift_Concurrency_fatalError(0, "expected to early return from when "
1353-
"handling offer of last task in group");
1352+
swift_unreachable("expected to early return from when handling offer of last task in group");
13541353
}
13551354

13561355
assert(!hadErrorResult && "only successfully completed tasks can reach here");
@@ -1560,15 +1559,11 @@ AsyncTask* DiscardingTaskGroup::resumeWaitingTaskWithError(
15601559
waitingTask->ResumeContext);
15611560

15621561
fillGroupNextResult(waitingContext, result);
1563-
15641562
_swift_tsan_acquire(static_cast<Job *>(waitingTask));
1565-
// // TODO: allow the caller to suggest an executor
1566-
// waitingTask->flagAsAndEnqueueOnExecutor(ExecutorRef::generic());
15671563
return waitingTask;
15681564
} // TODO: what in the else???
15691565
#endif
1570-
// }
1571-
// }
1566+
return nullptr;
15721567
}
15731568

15741569
SWIFT_CC(swiftasync)

0 commit comments

Comments
 (0)