Skip to content

Support time.sleep #2354

@rth

Description

@rth

As mentioned in #97

noticed that time.sleep() is a no op in the pyodide's cpython webassembly runtime. As cpython implements it using select.select()'s timeout, it's not really a surprise that it's not supported by pyodide.

It would be good to provide a different implementation for time.sleep since sync code cannot use await asyncio.sleep

For instance, emscripten's musl has __clock_nanosleep but this might need threading enabled.

Other possible solutions were discussed in #97

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions