Skip to content

Commit cad7dfe

Browse files
committed
Update README.md
1 parent 3633df1 commit cad7dfe

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/src/embedded/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ communicate with their protocol buffer equivalents.
3232
The way Dart VM launches lightweight isolates versus Node.js launches worker
3333
threads are very different.
3434

35-
In Dart VM, the lightweight isolates shares program structures like loaded
35+
In Dart VM, the lightweight isolates share program structures like loaded
3636
libraries, classes, functions, etc., even including JIT optimized code. This
3737
allows main isolate to spawn child isolate with a reference to the entry point
3838
function.
@@ -56,10 +56,10 @@ function.
5656
In Node.JS, the worker threads do not share program structures. In order to
5757
launch a worker thread, it needs an entry point file, with the entry point
5858
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`.
6363

6464
```
6565
if (worker_threads.isMainThread) { if (worker_threads.isMainThread) {
@@ -76,9 +76,9 @@ point file will decide what to run depends on `worker_threads.isMainThread`.
7676
│ │ SyncMessagePort(channel.port1) ├─┼─────────────────────────────────────────────────────────────┼►│ SyncMessagePort(channel.port2) │ │
7777
│ └────────────────────────────────┘ │ │ └────────────────────────────────┘ │
7878
│ │ │ │
79-
│ ┌────────────────────────────────┐ │ Asynchronous Messaging │ ┌────────────────────
80-
│ │ channel.port1 │◄┼─────────────────────────────────────────────────────────────┼─┤ channel.port2
81-
│ └────────────────────────────────┘ │ │ └────────────────────
79+
│ ┌────────────────────────────────┐ │ Asynchronous Messaging │ ┌────────────────────────────────┐
80+
│ │ channel.port1 │◄┼─────────────────────────────────────────────────────────────┼─┤ channel.port2
81+
│ └────────────────────────────────┘ │ │ └────────────────────────────────┘
8282
│ │ │ │
8383
└────────────────────────────────────┘ └────────────────────────────────────┘
8484
```

0 commit comments

Comments
 (0)