зеркало из https://github.com/microsoft/napajs.git
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:
Родитель
50d8580bc0
Коммит
96c3aa41e8
|
@ -27,7 +27,9 @@
|
|||
- [`result.transportContext: transport.TransportContext`](#result-transportcontext)
|
||||
|
||||
## <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
|
||||
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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче