Skip to content

Allow low level pthread APIs to be called from Wasm Workers. #26631

@sbc100

Description

@sbc100

As of today in pure Wasm Worker build its simply not possible to call pthread functions.

In hybrid Wasm Workers + pthreads builds the APIs are available but we get undefined behaviour if pthread APIs are called from a Wasm Worker (since pthread_self() returns NULL).

Even in the pure Wasm Worker builds its problematic that we cannot use low level pthread APIs. For example we recently have to patch libc++ to avoid the pthread_mutex API. See #26345

We recently had some discussion of allowing pthread APIs in Wasm Workers, provided it can be done at zero cost for programs that don't use these APIs: #26568 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions