| 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 /// An isolate-compatible object registry and lookup service. | 5 /// An isolate-compatible object registry and lookup service. |
| 6 library dart.pkg.isolate.registry; | 6 library isolate.registry; |
| 7 | 7 |
| 8 import "dart:async" show Future, Completer, TimeoutException; | 8 import 'dart:async' show Future, Completer, TimeoutException; |
| 9 import "dart:isolate" show RawReceivePort, SendPort, Capability; | 9 import 'dart:collection' show HashMap, HashSet; |
| 10 import "dart:collection" show HashMap, HashSet; | 10 import 'dart:isolate' show RawReceivePort, SendPort, Capability; |
| 11 import "ports.dart"; | 11 |
| 12 import "src/lists.dart"; | 12 import 'ports.dart'; |
| 13 import 'src/lists.dart'; |
| 13 | 14 |
| 14 // Command tags. | 15 // Command tags. |
| 15 const int _ADD = 0; | 16 const int _ADD = 0; |
| 16 const int _REMOVE = 1; | 17 const int _REMOVE = 1; |
| 17 const int _ADD_TAGS = 2; | 18 const int _ADD_TAGS = 2; |
| 18 const int _REMOVE_TAGS = 3; | 19 const int _REMOVE_TAGS = 3; |
| 19 const int _GET_TAGS = 4; | 20 const int _GET_TAGS = 4; |
| 20 const int _FIND = 5; | 21 const int _FIND = 5; |
| 21 | 22 |
| 22 /// An isolate-compatible object registry. | 23 /// An isolate-compatible object registry. |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 } | 455 } |
| 455 | 456 |
| 456 /// Entry in [RegistryManager]. | 457 /// Entry in [RegistryManager]. |
| 457 class _RegistryEntry { | 458 class _RegistryEntry { |
| 458 final int id; | 459 final int id; |
| 459 final Object element; | 460 final Object element; |
| 460 final Set tags = new HashSet(); | 461 final Set tags = new HashSet(); |
| 461 final Capability removeCapability = new Capability(); | 462 final Capability removeCapability = new Capability(); |
| 462 _RegistryEntry(this.id, this.element); | 463 _RegistryEntry(this.id, this.element); |
| 463 } | 464 } |
| OLD | NEW |