OLD | NEW |
---|---|
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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
307 // No isolates were profiled. In order to reduce unnecessary CPU | 307 // No isolates were profiled. In order to reduce unnecessary CPU |
308 // load, we will wait until we are notified before attempting to | 308 // load, we will wait until we are notified before attempting to |
309 // interrupt again. | 309 // interrupt again. |
310 current_wait_time_ = Monitor::kNoTimeout; | 310 current_wait_time_ = Monitor::kNoTimeout; |
311 continue; | 311 continue; |
312 } | 312 } |
313 | 313 |
314 ASSERT(current_wait_time_ != Monitor::kNoTimeout); | 314 ASSERT(current_wait_time_ != Monitor::kNoTimeout); |
315 } | 315 } |
316 } | 316 } |
317 RemoveSignalHandler(); | |
siva
2015/04/07 18:18:07
Instead of a per OS RemoveSignalHandler() implemen
Cutch
2015/04/07 18:35:55
SignalHandler::Remove() on Windows is UNREACHABLE(
| |
317 if (FLAG_trace_thread_interrupter) { | 318 if (FLAG_trace_thread_interrupter) { |
318 OS::Print("ThreadInterrupter thread exiting.\n"); | 319 OS::Print("ThreadInterrupter thread exiting.\n"); |
319 } | 320 } |
320 { | 321 { |
321 // Signal to main thread we are exiting. | 322 // Signal to main thread we are exiting. |
322 MonitorLocker shutdown_ml(monitor_); | 323 MonitorLocker shutdown_ml(monitor_); |
323 thread_running_ = false; | 324 thread_running_ = false; |
324 shutdown_ml.Notify(); | 325 shutdown_ml.Notify(); |
325 } | 326 } |
326 } | 327 } |
327 | 328 |
328 } // namespace dart | 329 } // namespace dart |
OLD | NEW |