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

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

Issue 463993002: - Separate the thread implementation used in bin/ and vm/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
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"
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698