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

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: StartAndWait -> StartAndWaitForTesting Created 5 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 unified diff | Download patch
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 200
197 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle); 201 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle);
198 202
199 private: 203 private:
200 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); 204 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
201 }; 205 };
202 206
203 } // namespace base 207 } // namespace base
204 208
205 #endif // BASE_THREADING_PLATFORM_THREAD_H_ 209 #endif // BASE_THREADING_PLATFORM_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698