Skip to content

Commit ab3bfca

Browse files
authored
Merge pull request #36 from chicoxyzzy/patch-2
Rename atomic.wake to atomic.notify
2 parents 248ac19 + ffe030e commit ab3bfca

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ of [atomic instructions][atomics]. In Rust parlance this means that
5151
[`AtomicUsize`] and friends will actually compile to atomic operations, whereas
5252
today they're [simply lowered to single-threaded equivalents][wasm-singlethread]
5353
(as there's no threads!). While essential, these aren't too too thrilling just
54-
yet until you hit [`wait` and `wake`][wait-and-wake].
54+
yet until you hit [`wait` and `notify`][wait-and-notify].
5555

5656
Atomic modifications allow us to perform some level of synchronization, but
5757
full synchronization often requires actual blocking of a thread until another is
58-
finished. This is where the `i32.atomic.wait` and `atomic.wake` instructions
58+
finished. This is where the `i32.atomic.wait` and `atomic.notify` instructions
5959
come into play. First we can block a thread (atomically) using
60-
[`i32.atomic.wait`], and then another thread can execute [`atomic.wake`] to wake
60+
[`i32.atomic.wait`], and then another thread can execute [`atomic.notify`] to wake
6161
up a thread blocked on the same address. I believe this is similar to [futexes]
6262
on Linux, although I've never used them myself!
6363

@@ -632,9 +632,9 @@ Discord](https://discord.gg/6SHrCn), or follow along on GitHub with either
632632
[ray-patches]: https://github.com/alexcrichton/raytracer/compare/master...update-deps
633633
[firefox-spec-bug]: https://bugzilla.mozilla.org/show_bug.cgi?id=1496582
634634
[dlmalloc]: https://github.com/alexcrichton/dlmalloc-rs
635-
[wait-and-wake]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wait-and-wake-operators
635+
[wait-and-notify]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wait-and-notify-operators
636636
[`i32.atomic.wait`]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wait
637-
[`atomic.wake`]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wake
637+
[`atomic.notify`]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#notify
638638
[`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
639639
[`Arc`]: https://doc.rust-lang.org/std/sync/struct.Arc.html
640640
[`start`]: http://webassembly.github.io/spec/core/syntax/modules.html#start-function

0 commit comments

Comments
 (0)