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

Side by Side Diff: base/threading/worker_pool_posix.h

Issue 7461141: Rename BASE_API to BASE_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « base/threading/worker_pool.h ('k') | base/time.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // The thread pool used in the POSIX implementation of WorkerPool dynamically 5 // The thread pool used in the POSIX implementation of WorkerPool dynamically
6 // adds threads as necessary to handle all tasks. It keeps old threads around 6 // adds threads as necessary to handle all tasks. It keeps old threads around
7 // for a period of time to allow them to be reused. After this waiting period, 7 // for a period of time to allow them to be reused. After this waiting period,
8 // the threads exit. This thread pool uses non-joinable threads, therefore 8 // the threads exit. This thread pool uses non-joinable threads, therefore
9 // worker threads are not joined during process shutdown. This means that 9 // worker threads are not joined during process shutdown. This means that
10 // potentially long running tasks (such as DNS lookup) do not block process 10 // potentially long running tasks (such as DNS lookup) do not block process
(...skipping 23 matching lines...) Expand all
34 #include "base/memory/scoped_ptr.h" 34 #include "base/memory/scoped_ptr.h"
35 #include "base/synchronization/condition_variable.h" 35 #include "base/synchronization/condition_variable.h"
36 #include "base/synchronization/lock.h" 36 #include "base/synchronization/lock.h"
37 #include "base/threading/platform_thread.h" 37 #include "base/threading/platform_thread.h"
38 #include "base/tracked.h" 38 #include "base/tracked.h"
39 39
40 class Task; 40 class Task;
41 41
42 namespace base { 42 namespace base {
43 43
44 class BASE_API PosixDynamicThreadPool 44 class BASE_EXPORT PosixDynamicThreadPool
45 : public RefCountedThreadSafe<PosixDynamicThreadPool> { 45 : public RefCountedThreadSafe<PosixDynamicThreadPool> {
46 public: 46 public:
47 class PosixDynamicThreadPoolPeer; 47 class PosixDynamicThreadPoolPeer;
48 48
49 struct PendingTask { 49 struct PendingTask {
50 PendingTask(const tracked_objects::Location& posted_from, 50 PendingTask(const tracked_objects::Location& posted_from,
51 const base::Closure& task); 51 const base::Closure& task);
52 ~PendingTask(); 52 ~PendingTask();
53 // TODO(ajwong): After we figure out why Mac's ~AtExitManager dies when 53 // TODO(ajwong): After we figure out why Mac's ~AtExitManager dies when
54 // destructing the lock, add in extra info so we can call 54 // destructing the lock, add in extra info so we can call
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Only used for tests to ensure correct thread ordering. It will always be 106 // Only used for tests to ensure correct thread ordering. It will always be
107 // NULL in non-test code. 107 // NULL in non-test code.
108 scoped_ptr<ConditionVariable> num_idle_threads_cv_; 108 scoped_ptr<ConditionVariable> num_idle_threads_cv_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(PosixDynamicThreadPool); 110 DISALLOW_COPY_AND_ASSIGN(PosixDynamicThreadPool);
111 }; 111 };
112 112
113 } // namespace base 113 } // namespace base
114 114
115 #endif // BASE_THREADING_WORKER_POOL_POSIX_H_ 115 #endif // BASE_THREADING_WORKER_POOL_POSIX_H_
OLDNEW
« no previous file with comments | « base/threading/worker_pool.h ('k') | base/time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698