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

Unified Diff: base/threading/simple_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/threading/platform_thread_win.cc ('k') | base/threading/simple_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/simple_thread.h
diff --git a/base/threading/simple_thread.h b/base/threading/simple_thread.h
index ecd360405f1348bf899d05f61fca50a9fa0e0db0..36548d36fd5af04711218f85eda7240b47f3f1d4 100644
--- a/base/threading/simple_thread.h
+++ b/base/threading/simple_thread.h
@@ -59,7 +59,7 @@ class BASE_EXPORT SimpleThread : public PlatformThread::Delegate {
public:
class BASE_EXPORT Options {
public:
- Options() : stack_size_(0) { }
+ Options() : stack_size_(0), priority_(ThreadPriority::NORMAL) { }
~Options() { }
// We use the standard compiler-supplied copy constructor.
@@ -67,8 +67,13 @@ class BASE_EXPORT SimpleThread : public PlatformThread::Delegate {
// A custom stack size, or 0 for the system default.
void set_stack_size(size_t size) { stack_size_ = size; }
size_t stack_size() const { return stack_size_; }
+
+ // A custom thread priority.
+ void set_priority(ThreadPriority priority) { priority_ = priority; }
+ ThreadPriority priority() const { return priority_; }
private:
size_t stack_size_;
+ ThreadPriority priority_;
};
// Create a SimpleThread. |options| should be used to manage any specific
« no previous file with comments | « base/threading/platform_thread_win.cc ('k') | base/threading/simple_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698