-
-
Notifications
You must be signed in to change notification settings - Fork 976
Closed
Labels
Description
I 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.
That said I have to call a javascript function from the python runtime and the js function will do asynchronous stuff before being able to return the value. eg:
from js import my_async_javascript_function
I first tried to do polling but without time.sleep()
it's not doable.
How can I handle this properly with pyodide ? Through Promise ? async/await ? ... I could not find a clue for this, any hint would be appreciated.
Thanks