Skip to content

[embind] Only initialize pthread member in multi-threaded builds. NFC#26508

Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:embind_pthread_check
Mar 20, 2026
Merged

[embind] Only initialize pthread member in multi-threaded builds. NFC#26508
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:embind_pthread_check

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Mar 20, 2026

Specifically, this avoids referencing pthead_self is Wasm Workers builds.

Split out from #26487

@sbc100 sbc100 enabled auto-merge (squash) March 20, 2026 21:14
@sbc100 sbc100 merged commit 93519b6 into emscripten-core:main Mar 20, 2026
38 checks passed
@sbc100 sbc100 deleted the embind_pthread_check branch March 20, 2026 22:04
@kleisauke
Copy link
Collaborator

FWIW, I was going to suggest #ifdef-ing out the thread member too, but then I remembered comment #20344 (comment), i.e. that would make sizeof(emscripten::val) different across compilation units. In other words, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants