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

Side by Side Diff: ios/web/web_thread_impl.cc

Issue 2135413003: Add |joinable| to Thread::Options (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ignore SetMessageLoop(nullptr) for now -- added TODO Created 4 years, 4 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 | « content/browser/browser_thread_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "ios/web/web_thread_impl.h" 5 #include "ios/web/web_thread_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 } // namespace 120 } // namespace
121 121
122 WebThreadImpl::WebThreadImpl(ID identifier) 122 WebThreadImpl::WebThreadImpl(ID identifier)
123 : Thread(GetThreadName(identifier)), identifier_(identifier) { 123 : Thread(GetThreadName(identifier)), identifier_(identifier) {
124 Initialize(); 124 Initialize();
125 } 125 }
126 126
127 WebThreadImpl::WebThreadImpl(ID identifier, base::MessageLoop* message_loop) 127 WebThreadImpl::WebThreadImpl(ID identifier, base::MessageLoop* message_loop)
128 : Thread(GetThreadName(identifier)), identifier_(identifier) { 128 : Thread(GetThreadName(identifier)), identifier_(identifier) {
129 set_message_loop(message_loop); 129 SetMessageLoop(message_loop);
130 Initialize(); 130 Initialize();
131 } 131 }
132 132
133 // static 133 // static
134 void WebThreadImpl::ShutdownThreadPool() { 134 void WebThreadImpl::ShutdownThreadPool() {
135 // The goal is to make it impossible to 'infinite loop' during shutdown, 135 // The goal is to make it impossible to 'infinite loop' during shutdown,
136 // but to reasonably expect that all BLOCKING_SHUTDOWN tasks queued during 136 // but to reasonably expect that all BLOCKING_SHUTDOWN tasks queued during
137 // shutdown get run. There's nothing particularly scientific about the 137 // shutdown get run. There's nothing particularly scientific about the
138 // number chosen. 138 // number chosen.
139 const int kMaxNewShutdownBlockingTasks = 1000; 139 const int kMaxNewShutdownBlockingTasks = 1000;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 AtomicWord* storage = 499 AtomicWord* storage =
500 reinterpret_cast<AtomicWord*>(&globals.thread_delegates[identifier]); 500 reinterpret_cast<AtomicWord*>(&globals.thread_delegates[identifier]);
501 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( 501 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange(
502 storage, reinterpret_cast<AtomicWord>(delegate)); 502 storage, reinterpret_cast<AtomicWord>(delegate));
503 503
504 // This catches registration when previously registered. 504 // This catches registration when previously registered.
505 DCHECK(!delegate || !old_pointer); 505 DCHECK(!delegate || !old_pointer);
506 } 506 }
507 507
508 } // namespace web 508 } // namespace web
OLDNEW
« no previous file with comments | « content/browser/browser_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698