Skip to content

pthread workers fail to run when ENVIRONMENT=worker only #21989

Closed
@steveanton

Description

@steveanton

isPthread is returning false for pthread workers in this scenario.

isPthread check inside of the pthread workers relies on the 'name' property being set on the Worker constructor from the main Emscripten JS. However, that 'name' property is only set in two conditions (https://github.com/emscripten-core/emscripten/blob/main/src/library_pthread.js#L427): when ENVIRONMENT_MAY_BE_NODE or ENVIRONMENT_MAY_BE_WEB. Notably ENVIRONMENT_MAY_BE_WEB only includes ENVIRONMENT=web and not ENVIRONMENT=worker.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions