• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef BASE_TASK_SCHEDULER_SINGLE_THREAD_TASK_RUNNER_THREAD_MODE_H_
6 #define BASE_TASK_SCHEDULER_SINGLE_THREAD_TASK_RUNNER_THREAD_MODE_H_
7 
8 namespace base {
9 
10 enum class SingleThreadTaskRunnerThreadMode {
11   // Allow the SingleThreadTaskRunner's thread to be shared with others,
12   // allowing for efficient use of thread resources when this
13   // SingleThreadTaskRunner is idle. This is the default mode and is
14   // recommended for most code.
15   SHARED,
16   // Dedicate a single thread for this SingleThreadTaskRunner. No other tasks
17   // from any other source will run on the thread backing the
18   // SingleThreadTaskRunner. Use sparingly as this reserves an entire thread for
19   // this SingleThreadTaskRunner.
20   DEDICATED,
21 };
22 
23 }  // namespace base
24 
25 #endif  // BASE_TASK_SCHEDULER_SINGLE_THREAD_TASK_RUNNER_THREAD_MODE_H_
26