Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: base/threading/worker_pool_posix_unittest.cc

Issue 1550503002: Switch to standard integer types in base/threading/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/threading/worker_pool_posix.cc ('k') | base/threading/worker_pool_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/threading/worker_pool_posix.h" 5 #include "base/threading/worker_pool_posix.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h"
11 #include "base/synchronization/condition_variable.h" 12 #include "base/synchronization/condition_variable.h"
12 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
13 #include "base/synchronization/waitable_event.h" 14 #include "base/synchronization/waitable_event.h"
14 #include "base/threading/platform_thread.h" 15 #include "base/threading/platform_thread.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 17
17 namespace base { 18 namespace base {
18 19
19 // Peer class to provide passthrough access to PosixDynamicThreadPool internals. 20 // Peer class to provide passthrough access to PosixDynamicThreadPool internals.
20 class PosixDynamicThreadPool::PosixDynamicThreadPoolPeer { 21 class PosixDynamicThreadPool::PosixDynamicThreadPoolPeer {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // joined, the next-created thread can get a re-used ID if the allocation of 246 // joined, the next-created thread can get a re-used ID if the allocation of
246 // the pthread_t structure is taken from the free list. Therefore, there can 247 // the pthread_t structure is taken from the free list. Therefore, there can
247 // be either 2 or 3 unique thread IDs in the set at this stage in the test. 248 // be either 2 or 3 unique thread IDs in the set at this stage in the test.
248 EXPECT_TRUE(unique_threads_.size() >= 2 && unique_threads_.size() <= 3) 249 EXPECT_TRUE(unique_threads_.size() >= 2 && unique_threads_.size() <= 3)
249 << "unique_threads_.size() = " << unique_threads_.size(); 250 << "unique_threads_.size() = " << unique_threads_.size();
250 EXPECT_EQ(1, peer_.num_idle_threads()); 251 EXPECT_EQ(1, peer_.num_idle_threads());
251 EXPECT_EQ(4, counter_); 252 EXPECT_EQ(4, counter_);
252 } 253 }
253 254
254 } // namespace base 255 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/worker_pool_posix.cc ('k') | base/threading/worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698