~/talk

A journey of multithreading using WebAssembly

Talkat revo.js 2019 · 2019-10-03..10-04· [webassembly, web-platform]
slides:none on file

Shows how WebAssembly gains real threads by using a shared linear memory (memory with the shared: true flag), SharedArrayBuffer and Atomics.wait/notify, with compilation via Emscripten and the wasm binary toolkit (wabt). Builds a C++ matrix painter (3x3) that initially reports 10 painted cells for 9 cells due to races, fixes it by providing mutexes implemented with atomic wait/notify. Demonstrates emscripten switches like -s USE_PTHREADS, measures runtime (single ~4s, two threads ~6s better, many threads up to ~13s worse) and notes Chrome enables SAB by default while other browsers need flags.

AI-written summary · about

  1. 0:00Introduction to multithreading
  2. 1:15Defining threads of execution
  3. 2:20Multitasking vs multithreading
  4. 3:24When and why to use threads
  5. 4:56WebAssembly and threading
  6. 6:40Understanding web workers
  7. 8:18WebAssembly thread proposal
  8. 10:02Implementing shared memory
  9. 11:57Security and browser support
  10. 13:27Synchronization and atomics
  11. 15:12Practical coding demonstration
  12. 23:55Conclusion and future outlook
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.