Skip to content

Commit 884bdaf

Browse files
authored
Merge pull request rustwasm#32 from bnjbvr/patch-1
moar typos
2 parents 705c09c + f4806b7 commit 884bdaf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

_posts/2018-10-24-multithreading-rust-and-wasm.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ theory lots of runway for us to figure out something to help us out!
277277

278278
I'd hate to leave you with a cliffhanger like this, though! While not all of the
279279
above questions have great answers today, I've been working on at least a
280-
*functioning* solution to many of the in `wasm-bindgen` specifically. Let's take
280+
*functioning* solution to many of the issues in `wasm-bindgen` specifically. Let's take
281281
a look at that and see if we can actually demo threads and WebAssembly today!
282282

283283
### Threads and `wasm-bindgen`
@@ -303,7 +303,7 @@ questions with this newfound power.
303303

304304
#### Injecting thread-local `global`s
305305

306-
Although LLVM/LLD dont't currently have the ability to emit custom `global`
306+
Although LLVM/LLD don't currently have the ability to emit custom `global`
307307
variables, we do in `wasm-bindgen`! This is an easy method to implement
308308
thread-local storage, so let's have `wasm-bindgen` inject two globals:
309309

@@ -315,7 +315,7 @@ thread-local storage, so let's have `wasm-bindgen` inject two globals:
315315
2. Next, a TCB slot. A TCB is a "thread control block" and is typically used to
316316
store an allocated structure in threading runtimes. This allocated structure
317317
is an entry point for lots of other runtime-related functionality, but for
318-
now we'll primarily used this as storage for user-defined thread-local
318+
now we'll primarily use this as storage for user-defined thread-local
319319
values. Or, in other words, this is how we'll implement [`thread_local!`].
320320

321321
It's easy enough to add two `global` variables of type `i32` to the wasm module,
@@ -359,7 +359,7 @@ these steps:
359359

360360
2. We know we're the first thread (the main thread) if our thread ID is zero.
361361
This is a great time to initialize memory, so `wasm-bindgen` can flag all our
362-
data segments as `passive`, and if our ID 0 is 0 we can call `memory.init`.
362+
data segments as `passive`, and if our ID is 0 we can call `memory.init`.
363363

364364
3. If our thread ID isn't 0, then we know that we're a spawned thread. LLVM
365365
already arranged for there to be a `global` for our stack pointer, but its
@@ -407,7 +407,7 @@ awesome to have a story for bundlers for large-scale integration. Unfortunately
407407
I ran into a few snags like [you can't access the
408408
`WebAssembly.Module`][webpack-wasm-module] and it also wasn't clear to me how
409409
workers would use a different instantiation path that would `onmessage` to wait
410-
for the module/memory and the instantiate after receiving. Fear not, though, I'm
410+
for the module/memory and then instantiate after receiving. Fear not, though, I'm
411411
sure we'll figure out a bundler story for this one way or another!
412412

413413
Next I turned to `wasm-bindgen`'s [`--no-modules`] option to see if something

0 commit comments

Comments
 (0)