Index: base/threading/platform_thread.h |
diff --git a/base/threading/platform_thread.h b/base/threading/platform_thread.h |
index 3468f45f91efd4929ea838f91559251a2d75a4ef..e9ec9c63a9679a4c15eb5052949054db342f458c 100644 |
--- a/base/threading/platform_thread.h |
+++ b/base/threading/platform_thread.h |
@@ -112,8 +112,8 @@ class PlatformThreadHandle { |
const PlatformThreadId kInvalidThreadId(0); |
-// Valid values for SetThreadPriority(), listed in increasing order of |
-// importance. |
+// Valid values for priority of Thread::Options and SimpleThread::Options, and |
+// SetCurrentThreadPriority(), listed in increasing order of importance. |
enum class ThreadPriority { |
// Suitable for threads that shouldn't disrupt high priority work. |
BACKGROUND, |
@@ -176,8 +176,7 @@ class BASE_EXPORT PlatformThread { |
PlatformThreadHandle* thread_handle); |
// CreateWithPriority() does the same thing as Create() except the priority of |
- // the thread is set based on |priority|. Can be used in place of Create() |
- // followed by SetThreadPriority(). |
+ // the thread is set based on |priority|. |
static bool CreateWithPriority(size_t stack_size, Delegate* delegate, |
PlatformThreadHandle* thread_handle, |
ThreadPriority priority); |
@@ -192,15 +191,10 @@ class BASE_EXPORT PlatformThread { |
// |thread_handle|. |
static void Join(PlatformThreadHandle thread_handle); |
- // Toggles the target thread's priority at runtime. Prefer |
- // CreateWithPriority() to set the thread's initial priority. |
- // NOTE: The call may fail if the caller thread is not the same as the |
- // target thread on POSIX. For example, seccomp-bpf blocks it by default |
- // in the sandbox. |
- static void SetThreadPriority(PlatformThreadHandle handle, |
- ThreadPriority priority); |
+ // Toggles the current thread's priority at runtime. |
gab
2015/06/23 17:01:32
Should we add an explanation here with link to a b
Takashi Toyoshima
2015/06/24 04:15:39
Done.
|
+ static void SetCurrentThreadPriority(ThreadPriority priority); |
- static ThreadPriority GetThreadPriority(PlatformThreadHandle handle); |
+ static ThreadPriority GetCurrentThreadPriority(); |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); |