Skip to content

_emscripten_init_main_thread_js should support can_block=ENVIRONMENT_IS_WORKER #26628

@olokobayusuf

Description

@olokobayusuf

Working with pthreads and web workers, Emscripten's check for can_block should respect ENVIRONMENT_IS_WORKER in addition to !ENVIRONMENT_IS_WEB.

__emscripten_thread_init(
tb,
/*is_main=*/!ENVIRONMENT_IS_WORKER,
/*is_runtime=*/1,
/*can_block=*/!ENVIRONMENT_IS_WEB,
/*default_stacksize=*/{{{ DEFAULT_PTHREAD_STACK_SIZE }}},
#if PTHREADS_PROFILING
/*start_profiling=*/true,
#else
/*start_profiling=*/false,
#endif
);

Metadata

Metadata

Assignees

No one assigned

    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