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

Unified Diff: base/threading/platform_thread.h

Issue 12741012: base: Support setting thread priorities generically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added back JNI for Audio. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/threading/platform_thread_mac.mm » ('j') | base/threading/platform_thread_posix.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/platform_thread.h
diff --git a/base/threading/platform_thread.h b/base/threading/platform_thread.h
index 576695a4e7b5f8028f47cc5e02921b551ffb0a39..2f7f3fe1617fc582cbd25794be8f27672cd8f702 100644
--- a/base/threading/platform_thread.h
+++ b/base/threading/platform_thread.h
@@ -43,7 +43,9 @@ const PlatformThreadId kInvalidThreadId = 0;
enum ThreadPriority{
kThreadPriority_Normal,
// Suitable for low-latency, glitch-resistant audio.
- kThreadPriority_RealtimeAudio
+ kThreadPriority_RealtimeAudio,
+ kThreadPriority_Display,
jar (doing other things) 2013/04/24 01:04:57 Although I can guess what Normal means, vs Backgro
epenner 2013/04/30 04:37:08 Done.
+ kThreadPriority_Background
};
// A namespace for low-level thread functions.
@@ -106,11 +108,11 @@ class BASE_EXPORT PlatformThread {
// |thread_handle|.
static void Join(PlatformThreadHandle thread_handle);
- // Sets the priority of the thread specified in |handle| to |priority|.
- // This does not work on Linux, use CreateWithPriority() instead.
+ // Only one of the handle/id is required depending on the
+ // platform. However, for cross platform code, pass both.
static void SetThreadPriority(PlatformThreadHandle handle,
+ PlatformThreadId id,
jar (doing other things) 2013/04/24 01:04:57 Rather than having both, can you unify this in a c
epenner 2013/04/30 04:37:08 See also my previous general comment on the patch.
ThreadPriority priority);
-
jar (doing other things) 2013/04/24 01:04:57 nit: preserve the white-space line before the priv
epenner 2013/04/30 04:37:08 Done.
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
};
« no previous file with comments | « no previous file | base/threading/platform_thread_mac.mm » ('j') | base/threading/platform_thread_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698