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

Side by Side Diff: base/threading/platform_thread.h

Issue 1011683002: Lazily initialize MessageLoop for faster thread startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « base/message_loop/message_pump_perftest.cc ('k') | base/threading/platform_thread_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 : handle_(handle), 82 : handle_(handle),
83 id_(0) { 83 id_(0) {
84 } 84 }
85 85
86 PlatformThreadHandle(Handle handle, 86 PlatformThreadHandle(Handle handle,
87 PlatformThreadId id) 87 PlatformThreadId id)
88 : handle_(handle), 88 : handle_(handle),
89 id_(id) { 89 id_(id) {
90 } 90 }
91 91
92 PlatformThreadId id() const {
93 return id_;
94 }
95
92 bool is_equal(const PlatformThreadHandle& other) const { 96 bool is_equal(const PlatformThreadHandle& other) const {
93 return handle_ == other.handle_; 97 return handle_ == other.handle_;
94 } 98 }
95 99
96 bool is_null() const { 100 bool is_null() const {
97 return !handle_; 101 return !handle_;
98 } 102 }
99 103
100 Handle platform_handle() const { 104 Handle platform_handle() const {
101 return handle_; 105 return handle_;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 199
196 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle); 200 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle);
197 201
198 private: 202 private:
199 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); 203 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
200 }; 204 };
201 205
202 } // namespace base 206 } // namespace base
203 207
204 #endif // BASE_THREADING_PLATFORM_THREAD_H_ 208 #endif // BASE_THREADING_PLATFORM_THREAD_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_pump_perftest.cc ('k') | base/threading/platform_thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698