| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ | 5 #ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ |
| 6 #define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ | 6 #define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 | 14 |
| 15 class TimeDelta; | 15 class TimeDelta; |
| 16 | 16 |
| 17 namespace internal { | |
| 18 | |
| 19 class BASE_EXPORT SchedulerWorkerPoolParams final { | 17 class BASE_EXPORT SchedulerWorkerPoolParams final { |
| 20 public: | 18 public: |
| 21 enum class IORestriction { | 19 enum class IORestriction { |
| 22 ALLOWED, | 20 ALLOWED, |
| 23 DISALLOWED, | 21 DISALLOWED, |
| 24 }; | 22 }; |
| 25 | 23 |
| 26 // Construct a scheduler worker pool parameter object that instructs a | 24 // Construct a scheduler worker pool parameter object that instructs a |
| 27 // scheduler worker pool to use the label |name| and create up to | 25 // scheduler worker pool to use the label |name| and create up to |
| 28 // |max_threads| threads of priority |thread_priority|. |io_restriction| | 26 // |max_threads| threads of priority |thread_priority|. |io_restriction| |
| (...skipping 30 matching lines...) Expand all Loading... |
| 59 private: | 57 private: |
| 60 std::string name_; | 58 std::string name_; |
| 61 ThreadPriority thread_priority_; | 59 ThreadPriority thread_priority_; |
| 62 IORestriction io_restriction_; | 60 IORestriction io_restriction_; |
| 63 size_t max_threads_; | 61 size_t max_threads_; |
| 64 TimeDelta suggested_reclaim_time_; | 62 TimeDelta suggested_reclaim_time_; |
| 65 | 63 |
| 66 DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerPoolParams); | 64 DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerPoolParams); |
| 67 }; | 65 }; |
| 68 | 66 |
| 69 } // namespace internal | |
| 70 } // namespace base | 67 } // namespace base |
| 71 | 68 |
| 72 #endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ | 69 #endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ |
| OLD | NEW |