8 ms·
It already has a process/event queue like JS since Emacs 26. What did you mean in particular?
by ywei3410 4y ago
It already has a process/event queue like JS since Emacs 26. What did you mean in particular?
- wyuenho 4y agoWhat did YOU mean in particular?
- ywei3410 4y agoI meant exactly that, both core JS and ELisp share the same model of a global interpreter where blocks of code can be interleaved and yielded (both manually and in response to external events). I wanted to know what in particular about JS you were missing.
- wyuenho 4y agoYou have been able to emulate cooperative multitasking using callbacks since at least the 70s with lisp. There's always been some form of concurrency in any lisp, the problem is, the event listening/emitter pattern is pretty much not a thing in Emacs, so you can't fire a custom event and hope it will drop into the event loop and get responded to by whatever is listening, because it's not an event loop, it's a command loop. The types of events you can respond to is fixed.