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

Side by Side Diff: lib/load_balancer.dart

Issue 1036513002: pkg/isolate: spelling fixes (Closed) Base URL: https://github.com/dart-lang/isolate.git@master
Patch Set: one more Created 5 years, 9 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 | « example/runner_pool.dart ('k') | lib/ports.dart » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// A load-balancing runner pool. 5 /// A load-balancing runner pool.
6 library isolate.load_balancer; 6 library isolate.load_balancer;
7 7
8 import 'dart:async' show Future; 8 import 'dart:async' show Future;
9 9
10 import 'runner.dart'; 10 import 'runner.dart';
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 int queueIndex = -1; 260 int queueIndex = -1;
261 261
262 // The service used to send commands to the other isolate. 262 // The service used to send commands to the other isolate.
263 Runner runner; 263 Runner runner;
264 264
265 _LoadBalancerEntry(Runner runner) : runner = runner; 265 _LoadBalancerEntry(Runner runner) : runner = runner;
266 266
267 /// Whether the entry is still in the queue. 267 /// Whether the entry is still in the queue.
268 bool get inQueue => queueIndex >= 0; 268 bool get inQueue => queueIndex >= 0;
269 269
270 Future run(LoadBalancer balancer, int load, function(argumen), argument, 270 Future run(LoadBalancer balancer, int load, function(argument), argument,
271 Duration timeout, onTimeout()) { 271 Duration timeout, onTimeout()) {
272 return runner.run(function, argument, 272 return runner.run(function, argument,
273 timeout: timeout, onTimeout: onTimeout).whenComplete(() { 273 timeout: timeout, onTimeout: onTimeout).whenComplete(() {
274 balancer._decreaseLoad(this, load); 274 balancer._decreaseLoad(this, load);
275 }); 275 });
276 } 276 }
277 277
278 Future close() => runner.close(); 278 Future close() => runner.close();
279 279
280 int compareTo(_LoadBalancerEntry other) => load - other.load; 280 int compareTo(_LoadBalancerEntry other) => load - other.load;
281 } 281 }
OLDNEW
« no previous file with comments | « example/runner_pool.dart ('k') | lib/ports.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698