Skip to content

Commit

Permalink
doc: fix line length in worker_threads.md
Browse files Browse the repository at this point in the history
PR-URL: #34419
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
jucke authored and cjihrig committed Jul 22, 2020
1 parent 8981e0c commit 8a9770d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ markAsUntransferable(pooledBuffer);
const { port1 } = new MessageChannel();
port1.postMessage(typedArray1, [ typedArray1.buffer ]);

// The following line prints the contents of typedArray1 -- it still owns its
// memory and has been cloned, not transferred. Without `markAsUntransferable()`,
// this would print an empty Uint8Array. typedArray2 is intact as well.
// The following line prints the contents of typedArray1 -- it still owns
// its memory and has been cloned, not transferred. Without
// `markAsUntransferable()`, this would print an empty Uint8Array.
// typedArray2 is intact as well.
console.log(typedArray1);
console.log(typedArray2);
```
Expand Down

0 comments on commit 8a9770d

Please sign in to comment.