From 54b3f6679a77675364c362886dccd6e621c0cdab Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 22 Apr 2026 15:38:29 -0700 Subject: [PATCH] Mention `gettid()` in Wasm Worker docs. NFC Should have been part of #26472. --- site/source/docs/api_reference/wasm_workers.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/source/docs/api_reference/wasm_workers.rst b/site/source/docs/api_reference/wasm_workers.rst index 409b39ba78bd1..69d1a3a4b0730 100644 --- a/site/source/docs/api_reference/wasm_workers.rst +++ b/site/source/docs/api_reference/wasm_workers.rst @@ -95,7 +95,8 @@ Pthreads and Wasm Workers share several similarities: * Both types of threads support TLS via explicitly linked in Wasm globals (see ``test/wasm_worker/wasm_worker_tls_wasm_assembly.c/.S`` for example code) * Both types of threads have a concept of a thread ID (``pthread_self()`` for pthreads, - ``emscripten_wasm_worker_self_id()`` for Wasm Workers) + ``emscripten_wasm_worker_self_id()`` for Wasm Workers). `gettid()` works in + both contexts so is more portable. * Both types of threads can perform an event-based and an infinite loop programming model. * Both can use ``EM_ASM`` and ``EM_JS`` API to execute JS code on the calling thread. * Both can call out to JS library functions (linked in with ``--js-library`` directive) to