Denis Erygin
Functions including emscripten_sleep() and functions calling them are compiled
to Emterpreter byte codes, not wasm directly. The byte codes are executed by an
interpreter called Emterpreter. Emterpreter suspends the execution of function at the call of emscripten_sleep(), stores the execution state, wait for duration asynchronously,
and resumes the execution state to contue to run. Вот додумались же до такого...
Я тебе об этом сразу сказал, а ты решил что умнее всех?
Он делает что-то типа:
(function async tick() {
///lalalala
await sleep (10)
///lalala
await tick ()
})()