Skip to content

Commit

Permalink
test_atomic_wait.hpp: remove another timing assumption (microsoft#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGuteniev authored Aug 14, 2020
1 parent 02bf0cf commit e7451b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/std/include/test_atomic_wait.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,14 @@ void test_pad_bits_impl(const std::chrono::steady_clock::duration waiting_durati
c.store(new_value);
c.notify_one();

#ifdef CAN_FAIL_ON_TIMING_ASSUMPTION
std::this_thread::sleep_for(waiting_duration);
assert(trigger);

w1.join();
#else // ^^^ CAN_FAIL_ON_TIMING_ASSUMPTION / !CAN_FAIL_ON_TIMING_ASSUMPTION vvv
w1.join();
assert(trigger);
#endif // ^^^ !CAN_FAIL_ON_TIMING_ASSUMPTION ^^^
}

template <class UnderlyingType>
Expand Down

0 comments on commit e7451b3

Please sign in to comment.