@@ -32,7 +32,7 @@ communicate with their protocol buffer equivalents.
32
32
The way Dart VM launches lightweight isolates versus Node.js launches worker
33
33
threads are very different.
34
34
35
- In Dart VM, the lightweight isolates shares program structures like loaded
35
+ In Dart VM, the lightweight isolates share program structures like loaded
36
36
libraries, classes, functions, etc., even including JIT optimized code. This
37
37
allows main isolate to spawn child isolate with a reference to the entry point
38
38
function.
@@ -56,10 +56,10 @@ function.
56
56
In Node.JS, the worker threads do not share program structures. In order to
57
57
launch a worker thread, it needs an entry point file, with the entry point
58
58
function effectly hard-coded in the entry point file. While it's possible
59
- to have a separate entry point file for the worker threads, it's requires more
60
- complex packaging changes with ` cli_pkg ` , therefore the main thread the worker
61
- threads shares [ the same entry point file] ( js/executable.dart ) , and the entry
62
- point file will decide what to run depends on ` worker_threads.isMainThread ` .
59
+ to have a separate entry point file for the worker threads, it requires more
60
+ complex packaging changes with ` cli_pkg ` , therefore the main thread and the
61
+ worker threads share [ the same entry point file] ( js/executable.dart ) , which
62
+ decides what to run based on ` worker_threads.isMainThread ` .
63
63
64
64
```
65
65
if (worker_threads.isMainThread) { if (worker_threads.isMainThread) {
0 commit comments