From 5467a063eeb551d64cd0b7588d3aa7460328a38d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 30 Jul 2016 12:37:20 -0400 Subject: Improve Semaphore test --- test/sem_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/sem_test.cpp') diff --git a/test/sem_test.cpp b/test/sem_test.cpp index 03c3748..8a0cb45 100644 --- a/test/sem_test.cpp +++ b/test/sem_test.cpp @@ -64,5 +64,11 @@ main() waiter.join(); cout << "[Main] Exiting" << endl; + cout << "[Main] Waiting for 1/4 s..." << std::endl; + if (sem.timed_wait(250)) { + cerr << "error: Spurious wakeup" << std::endl; + } + cout << "[Main] Done" << std::endl; + return 0; } -- cgit v1.2.1