| OLD | NEW |
| 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 library isolate.process_runner; | 5 library isolate.process_runner; |
| 6 | 6 |
| 7 import 'dart:fletch'; | 7 import 'dart:dartino'; |
| 8 | 8 |
| 9 class ProcessRunner { | 9 class ProcessRunner { |
| 10 Channel _monitor; | 10 Channel _monitor; |
| 11 Port _monitorPort; | 11 Port _monitorPort; |
| 12 int _spawnedProcesses = 0; | 12 int _spawnedProcesses = 0; |
| 13 bool _joining = false; | 13 bool _joining = false; |
| 14 | 14 |
| 15 ProcessRunner() { | 15 ProcessRunner() { |
| 16 _monitor = new Channel(); | 16 _monitor = new Channel(); |
| 17 _monitorPort = new Port(_monitor); | 17 _monitorPort = new Port(_monitor); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 withProcessRunner(fn(ProcessRunner runner)) { | 51 withProcessRunner(fn(ProcessRunner runner)) { |
| 52 var runner = new ProcessRunner(); | 52 var runner = new ProcessRunner(); |
| 53 try { | 53 try { |
| 54 return fn(runner); | 54 return fn(runner); |
| 55 } finally { | 55 } finally { |
| 56 runner.join(); | 56 runner.join(); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| OLD | NEW |