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

Unified Diff: base/threading/platform_thread.h

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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 | « base/test/values_test_util.cc ('k') | base/threading/platform_thread_mac.mm » ('j') | no next file with comments »
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 d8f06e5884d559682660f8aedf73938473886c59..3468f45f91efd4929ea838f91559251a2d75a4ef 100644
--- a/base/threading/platform_thread.h
+++ b/base/threading/platform_thread.h
@@ -89,6 +89,10 @@ class PlatformThreadHandle {
id_(id) {
}
+ PlatformThreadId id() const {
+ return id_;
+ }
+
bool is_equal(const PlatformThreadHandle& other) const {
return handle_ == other.handle_;
}
@@ -102,8 +106,6 @@ class PlatformThreadHandle {
}
private:
- friend class PlatformThread;
-
Handle handle_;
PlatformThreadId id_;
};
@@ -190,6 +192,11 @@ 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);
« no previous file with comments | « base/test/values_test_util.cc ('k') | base/threading/platform_thread_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698