Add emscripten_queue_microtask() API
Add emscripten_queue_microtask() API to enable use case described in this thread: https://github.com/emscripten-core/emscripten/pull/25670#discussion_r2469827161.
I had a version of this API in https://github.com/emscripten-core/emscripten/pull/24481... but sure how it compares
I had a version of this API in #24481... but sure how it compares
Maybe just copy the version I had in that PR? Should probably live in libeventloop.js too.
I was recently chatting to someone on chrome team about why we this API event exists given that its pretty much indistinguishable from Promise.resolve().then(X) which predates queueMicrotask and is available everywhere.