diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-12-02 11:04:04 -0800 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-12-02 11:04:04 -0800 |
commit | 71c85df4c1ce4efa41bb4adc8e9cb224c3ca9a2d (patch) | |
tree | c0f768dccd1dbca1fe17621bf8638c9102b8f170 /unsupported/test/cxx11_tensor_notification.cpp | |
parent | 70fbcf82ed0a95b27ee68e20199a4e8e1e913268 (diff) |
Clean up the Tensor header and get rid of the EIGEN_SLEEP macro.
Diffstat (limited to 'unsupported/test/cxx11_tensor_notification.cpp')
-rw-r--r-- | unsupported/test/cxx11_tensor_notification.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/test/cxx11_tensor_notification.cpp b/unsupported/test/cxx11_tensor_notification.cpp index 2bade8dc7..8e8165302 100644 --- a/unsupported/test/cxx11_tensor_notification.cpp +++ b/unsupported/test/cxx11_tensor_notification.cpp @@ -23,7 +23,7 @@ static void test_notification_single() Eigen::Notification n; auto func = [&n, &counter](){ n.Wait(); ++counter;}; thread_pool.Schedule(func); - EIGEN_SLEEP(1000); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // The thread should be waiting for the notification. VERIFY_IS_EQUAL(counter, 0); @@ -31,7 +31,7 @@ static void test_notification_single() // Unblock the thread n.Notify(); - EIGEN_SLEEP(1000); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // Verify the counter has been incremented VERIFY_IS_EQUAL(counter, 1); @@ -50,10 +50,10 @@ static void test_notification_multiple() thread_pool.Schedule(func); thread_pool.Schedule(func); thread_pool.Schedule(func); - EIGEN_SLEEP(1000); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); VERIFY_IS_EQUAL(counter, 0); n.Notify(); - EIGEN_SLEEP(1000); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); VERIFY_IS_EQUAL(counter, 4); } |