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

Side by Side Diff: runtime/bin/vmservice/vmservice_io.dart

Issue 1279733003: Clean VM thread shutdown: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merge Created 5 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 | « runtime/bin/utils.h ('k') | runtime/include/dart_api.h » ('j') | 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 library vmservice_io; 5 library vmservice_io;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:isolate'; 10 import 'dart:isolate';
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const _shortDelay = const Duration(milliseconds: 10); 82 const _shortDelay = const Duration(milliseconds: 10);
83 83
84 main() { 84 main() {
85 if (_autoStart) { 85 if (_autoStart) {
86 _bootServer(); 86 _bootServer();
87 server.startup(); 87 server.startup();
88 // It's just here to push an event on the event loop so that we invoke the 88 // It's just here to push an event on the event loop so that we invoke the
89 // scheduled microtasks. 89 // scheduled microtasks.
90 Timer.run(() {}); 90 Timer.run(() {});
91 } 91 }
92 // TODO(johnmccutchan, turnidge) Creating a VMService object here causes
93 // strange behavior from the legacy debug protocol and coverage tool.
94 // Enable this code, and remove the call to Isolate::KillIsolate() from
95 // service_isolate.cc when the strange behavior is solved.
96 // See: https://github.com/dart-lang/sdk/issues/23977
97 // else {
98 // var service = new VMService();
99 // service.onShutdown = _onShutdown;
100 // }
92 scriptLoadPort.handler = _processLoadRequest; 101 scriptLoadPort.handler = _processLoadRequest;
93 // Register signal handler after a small delay to avoid stalling main 102 // Register signal handler after a small delay to avoid stalling main
94 // isolate startup. 103 // isolate startup.
95 new Timer(_shortDelay, _registerSignalHandler); 104 new Timer(_shortDelay, _registerSignalHandler);
96 return scriptLoadPort; 105 return scriptLoadPort;
97 } 106 }
OLDNEW
« no previous file with comments | « runtime/bin/utils.h ('k') | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698