| 196 | } |
| 197 | |
| 198 | void AssertStopRequested() { |
| 199 | BusyWait(1.0, [&]() { return stop_token_->IsStopRequested(); }); |
| 200 | ASSERT_TRUE(stop_token_->IsStopRequested()); |
| 201 | auto st = stop_token_->Poll(); |
| 202 | ASSERT_RAISES(Cancelled, st); |
| 203 | ASSERT_EQ(st.message(), "Operation cancelled"); |
| 204 | ASSERT_EQ(internal::SignalFromStatus(st), expected_signal_); |
| 205 | } |
| 206 | |
| 207 | #ifndef _WIN32 |
| 208 | void RunInChild(std::function<void()> func) { |
nothing calls this directly
no test coverage detected