4 ms·
Nice, I had a crack at doing this a while back using emscripten, but couldn't get around that Vim's input handling is blocking. Looks like coolwanglu has found
by brotchie 12y ago
Nice, I had a crack at doing this a while back using emscripten, but couldn't get around that Vim's input handling is blocking.
Looks like coolwanglu has found a way around this by hacking some kind of async transformation into emscripten. I haven't looked at his code, but I suspect he specially handles known blocking libc calls. My guess is some how storing the set of stack frames when a blocking function is called so that the stack can be unwound to let the js engine continue.
Good stuff.
- coolwanglu 12y agoHi, this could be what you need :) https://github.com/kripken/emscripten/wiki/Asyncify https://github.com/kripken/emscripten/wiki/Asyncify
- ehsanu1 12y agoHad to do a double take at your comment, because I thought I wrote it! I wonder how many others there are.