Skip to content

Commit 1ab7b64

Browse files
committed
cleanup for freestanding mode
1 parent 9b86f02 commit 1ab7b64

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

stdlib/public/Concurrency/TaskGroup.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ void TaskGroupBase::runWaitingTask(PreparedWaitingTask prepared) {
660660
assert(prepared.waitingTask == nullptr &&
661661
"unexpected task to schedule in TASK_TO_THREAD_MODEL!"
662662
"In this mode we should have run the task in-line, "
663-
"rather than return it for scheduling.")
663+
"rather than return it for scheduling.");
664664
#endif
665665
if (auto waitingTask = prepared.waitingTask) {
666666
// TODO: allow the caller to suggest an executor

stdlib/public/Concurrency/TaskPrivate.h

+2
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,10 @@ struct AsyncTask::PrivateStorage {
781781

782782
// Destroy the opaque storage of the task
783783
void destroy() {
784+
#ifndef NDEBUG
784785
auto oldStatus = _status().load(std::memory_order_relaxed);
785786
assert(oldStatus.isComplete());
787+
#endif
786788

787789
this->~PrivateStorage();
788790
}

0 commit comments

Comments
 (0)