OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analysis.server; | 5 library analysis.server; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/src/analysis_logger.dart'; | 9 import 'package:analysis_server/src/analysis_logger.dart'; |
10 import 'package:analysis_server/src/channel.dart'; | 10 import 'package:analysis_server/src/channel.dart'; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 /** | 158 /** |
159 * Perform the tasks that are waiting for execution until the server is shut | 159 * Perform the tasks that are waiting for execution until the server is shut |
160 * down. | 160 * down. |
161 */ | 161 */ |
162 void run() { | 162 void run() { |
163 if (!running) { | 163 if (!running) { |
164 running = true; | 164 running = true; |
165 Timer.run(() { | 165 new Future(performTask).catchError((exception, stackTrace) { |
166 performTask(); | 166 AnalysisEngine.instance.logger.logError3(exception); |
167 }); | 167 }); |
168 } | 168 } |
169 } | 169 } |
170 | 170 |
171 /** | 171 /** |
172 * Send the given [notification] to the client. | 172 * Send the given [notification] to the client. |
173 */ | 173 */ |
174 void sendNotification(Notification notification) { | 174 void sendNotification(Notification notification) { |
175 channel.sendNotification(notification); | 175 channel.sendNotification(notification); |
176 } | 176 } |
177 } | 177 } |
OLD | NEW |