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" |
| 6 |
| 7 #include "vm/flags.h" |
| 8 #include "vm/lockers.h" |
| 9 #include "vm/os.h" |
5 #include "vm/simulator.h" | 10 #include "vm/simulator.h" |
6 #include "vm/thread_interrupter.h" | |
7 | 11 |
8 namespace dart { | 12 namespace dart { |
9 | 13 |
10 // Notes: | 14 // Notes: |
11 // | 15 // |
12 // The ThreadInterrupter interrupts all threads actively running isolates once | 16 // The ThreadInterrupter interrupts all threads actively running isolates once |
13 // per interrupt period (default is 1 millisecond). While the thread is | 17 // per interrupt period (default is 1 millisecond). While the thread is |
14 // interrupted, the thread's interrupt callback is invoked. Callbacks cannot | 18 // interrupted, the thread's interrupt callback is invoked. Callbacks cannot |
15 // rely on being executed on the interrupted thread. | 19 // rely on being executed on the interrupted thread. |
16 // | 20 // |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 317 } |
314 { | 318 { |
315 // Signal to main thread we are exiting. | 319 // Signal to main thread we are exiting. |
316 MonitorLocker shutdown_ml(monitor_); | 320 MonitorLocker shutdown_ml(monitor_); |
317 thread_running_ = false; | 321 thread_running_ = false; |
318 shutdown_ml.Notify(); | 322 shutdown_ml.Notify(); |
319 } | 323 } |
320 } | 324 } |
321 | 325 |
322 } // namespace dart | 326 } // namespace dart |
OLD | NEW |