| OLD | NEW |
| 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 // WARNING: You should *NOT* be using this class directly. PlatformThread is | 5 // WARNING: You should *NOT* be using this class directly. PlatformThread is |
| 6 // the low-level platform-specific abstraction to the OS's threading interface. | 6 // the low-level platform-specific abstraction to the OS's threading interface. |
| 7 // You should instead be using a message-loop driven Thread, see thread.h. | 7 // You should instead be using a message-loop driven Thread, see thread.h. |
| 8 | 8 |
| 9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_ | 9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_ |
| 10 #define BASE_THREADING_PLATFORM_THREAD_H_ | 10 #define BASE_THREADING_PLATFORM_THREAD_H_ |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 Handle handle_; | 95 Handle handle_; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 const PlatformThreadId kInvalidThreadId(0); | 98 const PlatformThreadId kInvalidThreadId(0); |
| 99 | 99 |
| 100 // Valid values for priority of Thread::Options and SimpleThread::Options, and | 100 // Valid values for priority of Thread::Options and SimpleThread::Options, and |
| 101 // SetCurrentThreadPriority(), listed in increasing order of importance. | 101 // SetCurrentThreadPriority(), listed in increasing order of importance. |
| 102 enum class ThreadPriority { | 102 enum class ThreadPriority : int { |
| 103 // Suitable for threads that shouldn't disrupt high priority work. | 103 // Suitable for threads that shouldn't disrupt high priority work. |
| 104 BACKGROUND, | 104 BACKGROUND, |
| 105 // Default priority level. | 105 // Default priority level. |
| 106 NORMAL, | 106 NORMAL, |
| 107 // Suitable for threads which generate data for the display (at ~60Hz). | 107 // Suitable for threads which generate data for the display (at ~60Hz). |
| 108 DISPLAY, | 108 DISPLAY, |
| 109 // Suitable for low-latency, glitch-resistant audio. | 109 // Suitable for low-latency, glitch-resistant audio. |
| 110 REALTIME_AUDIO, | 110 REALTIME_AUDIO, |
| 111 }; | 111 }; |
| 112 | 112 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 static ThreadPriority GetCurrentThreadPriority(); | 192 static ThreadPriority GetCurrentThreadPriority(); |
| 193 | 193 |
| 194 private: | 194 private: |
| 195 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); | 195 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace base | 198 } // namespace base |
| 199 | 199 |
| 200 #endif // BASE_THREADING_PLATFORM_THREAD_H_ | 200 #endif // BASE_THREADING_PLATFORM_THREAD_H_ |
| OLD | NEW |