Skip to content

Commit

Permalink
Make AsyncScope cleanup CHECK message a little neater
Browse files Browse the repository at this point in the history
Summary: We can stream messages into the CHECK macro. This diff does that instead of embedding the error message inside the CHECK condition.

Differential Revision: D35748723

fbshipit-source-id: b0d636587303443738f39ed5865366f24cef4979
  • Loading branch information
Kurt Tomlinson authored and facebook-github-bot committed Apr 19, 2022
1 parent 3ca50e3 commit f147eac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions folly/experimental/coro/AsyncScope.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ class AsyncScope {
};

inline AsyncScope::~AsyncScope() {
CHECK(
(!anyTasksStarted_.load(std::memory_order_relaxed) || joined_) &&
"cleanup() not yet complete");
CHECK(!anyTasksStarted_.load(std::memory_order_relaxed) || joined_)
<< "AsyncScope::cleanup() not yet complete";
}

inline std::size_t AsyncScope::remaining() const noexcept {
Expand Down

0 comments on commit f147eac

Please sign in to comment.