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

Side by Side Diff: runtime/vm/thread_interrupter.cc

Issue 1429173003: Revert "Hack around TLS destructors firing after the process exits" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « runtime/vm/os_thread_win.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/thread_interrupter.h" 5 #include "vm/thread_interrupter.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/lockers.h" 8 #include "vm/lockers.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/simulator.h" 10 #include "vm/simulator.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Join the thread. 105 // Join the thread.
106 ASSERT(interrupter_thread_id_ != OSThread::kInvalidThreadJoinId); 106 ASSERT(interrupter_thread_id_ != OSThread::kInvalidThreadJoinId);
107 OSThread::Join(interrupter_thread_id_); 107 OSThread::Join(interrupter_thread_id_);
108 interrupter_thread_id_ = OSThread::kInvalidThreadJoinId; 108 interrupter_thread_id_ = OSThread::kInvalidThreadJoinId;
109 109
110 if (FLAG_trace_thread_interrupter) { 110 if (FLAG_trace_thread_interrupter) {
111 OS::Print("ThreadInterrupter shut down.\n"); 111 OS::Print("ThreadInterrupter shut down.\n");
112 } 112 }
113 } 113 }
114 114
115
116 // Delay between interrupts. 115 // Delay between interrupts.
117 void ThreadInterrupter::SetInterruptPeriod(intptr_t period) { 116 void ThreadInterrupter::SetInterruptPeriod(intptr_t period) {
118 if (shutdown_) { 117 if (shutdown_) {
119 return; 118 return;
120 } 119 }
121 ASSERT(initialized_); 120 ASSERT(initialized_);
122 ASSERT(period > 0); 121 ASSERT(period > 0);
123 interrupt_period_ = period; 122 interrupt_period_ = period;
124 } 123 }
125 124
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 218 }
220 { 219 {
221 // Signal to main thread we are exiting. 220 // Signal to main thread we are exiting.
222 MonitorLocker shutdown_ml(monitor_); 221 MonitorLocker shutdown_ml(monitor_);
223 thread_running_ = false; 222 thread_running_ = false;
224 shutdown_ml.Notify(); 223 shutdown_ml.Notify();
225 } 224 }
226 } 225 }
227 226
228 } // namespace dart 227 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/os_thread_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698