aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_non_blocking_thread_pool.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-12-09 14:52:15 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-12-09 14:52:15 -0800
commit4deafd35b75cde9c9d40360a37c364594fd8161a (patch)
tree331800e21f91f2493625ce78154a7f404d77cde2 /unsupported/test/cxx11_non_blocking_thread_pool.cpp
parentaafa97f4d292bfe8f20756191ca34cf147e7778d (diff)
Introduce a portable EIGEN_SLEEP macro.
Diffstat (limited to 'unsupported/test/cxx11_non_blocking_thread_pool.cpp')
-rw-r--r--unsupported/test/cxx11_non_blocking_thread_pool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unsupported/test/cxx11_non_blocking_thread_pool.cpp b/unsupported/test/cxx11_non_blocking_thread_pool.cpp
index 80d0ee080..2c5765ce4 100644
--- a/unsupported/test/cxx11_non_blocking_thread_pool.cpp
+++ b/unsupported/test/cxx11_non_blocking_thread_pool.cpp
@@ -10,8 +10,8 @@
#define EIGEN_USE_THREADS
#include "main.h"
-#include <unistd.h>
#include "Eigen/CXX11/ThreadPool"
+#include "Eigen/CXX11/Tensor"
static void test_create_destroy_empty_pool()
{
@@ -109,7 +109,7 @@ static void test_cancel()
// Schedule a large number of closure that each sleeps for one second. This
// will keep the thread pool busy for much longer than the default test timeout.
for (int i = 0; i < 1000; ++i) {
- tp.Schedule([]() { sleep(2); });
+ tp.Schedule([]() { EIGEN_SLEEP(2000); });
}
// Cancel the processing of all the closures that are still pending.