diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-06-23 16:40:07 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-06-23 16:40:07 -0700 |
commit | a9c1e4d7b7ce7c9dc5310cee1ed13fdef08e506e (patch) | |
tree | 0da9ce7e94a29f6fc1071b4b0286ad089f803dc5 /unsupported/test/cxx11_non_blocking_thread_pool.cpp | |
parent | d39df320d29ecc678e019962dfb2bdf64b061197 (diff) |
Return -1 from CurrentThreadId when called by thread outside the pool.
Diffstat (limited to 'unsupported/test/cxx11_non_blocking_thread_pool.cpp')
-rw-r--r-- | unsupported/test/cxx11_non_blocking_thread_pool.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/test/cxx11_non_blocking_thread_pool.cpp b/unsupported/test/cxx11_non_blocking_thread_pool.cpp index 6e4e5cbab..5f9bb938b 100644 --- a/unsupported/test/cxx11_non_blocking_thread_pool.cpp +++ b/unsupported/test/cxx11_non_blocking_thread_pool.cpp @@ -28,7 +28,7 @@ static void test_parallelism() const int kThreads = 16; // code below expects that this is a multiple of 4 NonBlockingThreadPool tp(kThreads); VERIFY_IS_EQUAL(tp.NumThreads(), kThreads); - VERIFY_IS_EQUAL(tp.CurrentThreadId(), kThreads); + VERIFY_IS_EQUAL(tp.CurrentThreadId(), -1); for (int iter = 0; iter < 100; ++iter) { std::atomic<int> running(0); std::atomic<int> done(0); |