time.sleep sleeps indefinitely
dicej opened this issue · 3 comments
dicej commented
For example, when targeting the wasi:cli command world:
from hello import exports
from time import sleep
class Run(exports.Run):
def run(self):
print("Hello, world!")
sleep(0.00001)
The above prints "Hello, world!" and then seems to sleep forever.
dicej commented
Actually, this seems non-deterministic, i.e. it sometimes blocks forever and sometimes not at all. Someone on MacOS reported that it either doesn't block at all or traps with an integer or floating point overflow error.
dicej commented
This is addressed by bytecodealliance/wasmtime#6993
dicej commented
This was a bug in wasmtime-wasi
and will be fixed in Wasmtime 13, to be released soon.