Skip to content

Commit

Permalink
Minor doc fixes around workers API (#23328)
Browse files Browse the repository at this point in the history
Two very minor docs fixes:
- The path "test/wasm_workers" in the workers reference is incorrect.
- A comment in the header repeats "synchronisation primitives".
  • Loading branch information
slowriot authored Jan 7, 2025
1 parent d679c87 commit b7f557c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion site/source/docs/api_reference/wasm_workers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -402,4 +402,4 @@ The following build options are not supported at the moment with Wasm Workers:
Example Code
============

See the directory ``test/wasm_workers/`` for code examples on different Wasm Workers API functionality.
See the directory ``test/wasm_worker/`` for code examples on different Wasm Workers API functionality.
6 changes: 3 additions & 3 deletions system/include/emscripten/wasm_worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ uint32_t emscripten_wasm_worker_self_id(void);
// never be called.
// Passing messages between threads with this family of functions is relatively
// slow and has a really high latency cost compared to direct coordination using
// atomics and synchronization primitives like mutexes and synchronization
// primitives. Additionally these functions will generate garbage on the JS
// heap. Therefore avoid using these functions where performance is critical.
// atomics and synchronization primitives like mutexes. Additionally these
// functions will generate garbage on the JS heap. Therefore avoid using these
// functions where performance is critical.
void emscripten_wasm_worker_post_function_v(emscripten_wasm_worker_t id, void (*funcPtr)(void) __attribute__((nonnull)));
void emscripten_wasm_worker_post_function_vi(emscripten_wasm_worker_t id, void (*funcPtr)(int) __attribute__((nonnull)), int arg0);
void emscripten_wasm_worker_post_function_vii(emscripten_wasm_worker_t id, void (*funcPtr)(int, int) __attribute__((nonnull)), int arg0, int arg1);
Expand Down

0 comments on commit b7f557c

Please sign in to comment.