OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** | 5 /** |
6 * Concurrent programming using _isolates_: | 6 * Concurrent programming using _isolates_: |
7 * independent workers that are similar to threads | 7 * independent workers that are similar to threads |
8 * but don't share memory, | 8 * but don't share memory, |
9 * communicating only via messages. | 9 * communicating only via messages. |
10 * | 10 * |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 * then resume the isolate. | 432 * then resume the isolate. |
433 */ | 433 */ |
434 external void setErrorsFatal(bool errorsAreFatal); | 434 external void setErrorsFatal(bool errorsAreFatal); |
435 | 435 |
436 /** | 436 /** |
437 * Requests the isolate to shut down. | 437 * Requests the isolate to shut down. |
438 * | 438 * |
439 * The isolate is requested to terminate itself. | 439 * The isolate is requested to terminate itself. |
440 * The [priority] argument specifies when this must happen. | 440 * The [priority] argument specifies when this must happen. |
441 * | 441 * |
442 * The [priority] must be one of [IMMEDIATE] or [BEFORE_NEXT_EVENT]. | 442 * The [priority], when provided, must be one of [IMMEDIATE] or |
| 443 * [BEFORE_NEXT_EVENT] (the default). |
443 * The shutdown is performed at different times depending on the priority: | 444 * The shutdown is performed at different times depending on the priority: |
444 * | 445 * |
445 * * `IMMEDIATE`: The isolate shuts down as soon as possible. | 446 * * `IMMEDIATE`: The isolate shuts down as soon as possible. |
446 * Control messages are handled in order, so all previously sent control | 447 * Control messages are handled in order, so all previously sent control |
447 * events from this isolate will all have been processed. | 448 * events from this isolate will all have been processed. |
448 * The shutdown should happen no later than if sent with | 449 * The shutdown should happen no later than if sent with |
449 * `BEFORE_NEXT_EVENT`. | 450 * `BEFORE_NEXT_EVENT`. |
450 * It may happen earlier if the system has a way to shut down cleanly | 451 * It may happen earlier if the system has a way to shut down cleanly |
451 * at an earlier time, even during the execution of another event. | 452 * at an earlier time, even during the execution of another event. |
452 * * `BEFORE_NEXT_EVENT`: The shutdown is scheduled for the next time | 453 * * `BEFORE_NEXT_EVENT`: The shutdown is scheduled for the next time |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 * as the original error, but has no other features of the original error. | 705 * as the original error, but has no other features of the original error. |
705 */ | 706 */ |
706 class RemoteError implements Error { | 707 class RemoteError implements Error { |
707 final String _description; | 708 final String _description; |
708 final StackTrace stackTrace; | 709 final StackTrace stackTrace; |
709 RemoteError(String description, String stackDescription) | 710 RemoteError(String description, String stackDescription) |
710 : _description = description, | 711 : _description = description, |
711 stackTrace = new StackTrace.fromString(stackDescription); | 712 stackTrace = new StackTrace.fromString(stackDescription); |
712 String toString() => _description; | 713 String toString() => _description; |
713 } | 714 } |
OLD | NEW |