Update zone.md to distinguish from zone in DART (#85)

Add a note in zone API spec to distinguish from the zone concepts in DART, Angular and a proposal to TC39.
This commit is contained in:
Daiyi Peng 2017-10-19 14:10:35 -07:00 коммит произвёл GitHub
Родитель 50d8580bc0
Коммит 96c3aa41e8
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -27,7 +27,9 @@
- [`result.transportContext: transport.TransportContext`](#result-transportcontext) - [`result.transportContext: transport.TransportContext`](#result-transportcontext)
## <a name="intro"></a> Introduction ## <a name="intro"></a> Introduction
Zone is a key concept of napajs that exposes multi-thread capabilities in JavaScript world. Zone is a key concept of napajs that exposes multi-thread capabilities in JavaScript world, which is a logical group of symmetric workers for specific tasks.
Please note that it's not the same `zone` concept of a context object for async calls in [Dart](https://www.dartlang.org/articles/libraries/zones), or [Augular](https://github.com/angular/zone.js), or a proposal in [TC39](https://github.com/domenic/zones).
### <a name="worker-vs-zone"></a> Multiple workers vs. Multiple zones ### <a name="worker-vs-zone"></a> Multiple workers vs. Multiple zones
Zone consists of one or multiple JavaScript threads, we name each thread `worker`. Workers within a zone are symmetric, which means execute on any worker from the zone should return the same result, and the internal state of every worker should be the same from long running point of view. Zone consists of one or multiple JavaScript threads, we name each thread `worker`. Workers within a zone are symmetric, which means execute on any worker from the zone should return the same result, and the internal state of every worker should be the same from long running point of view.