3 ms·
Uh, Emacs has asynchronous IO, and it works fine. http://www.gnu.org/software/emacs/manual/html_node/elisp/Asynchronous-Processes.html http://www.gnu.org/softwa
by catern 12y ago
Uh, Emacs has asynchronous IO, and it works fine. http://www.gnu.org/software/emacs/manual/html_node/elisp/Asynchronous-Processes.html http://www.gnu.org/software/emacs/manual/html_node/elisp/Asy...
- chongli 12y agoIt has support for AIO, as had vim for quite a while, but it's not pervasive in the standard library and the ecosystem. Both editors have way too many plugins that block the UI needlessly while you're typing (autocompletion, syntax checking etc).
- tuhdo 12y agoIt's quite more popular than you think. `M-x term` is an example. It's a full-blown terminal emulator in Emacs that runs entirely in another process. Here is another example of async grep/ack/ag: http://tuhdo.github.io/helm-projectile.html#sec-9 http://tuhdo.github.io/helm-projectile.html#sec-9 . As you can see, Emacs gets line by line results from grep/ack/ag without blocking and gives you new results and you type. Or Emacs's fantastic support for communicating with REPLs in many interpreted languages. You can execute any shell command asynchronously while doing other things inside Emacs. You can even compile with beautiful output, in terminal: http://tuhdo.github.io/static/c-ide/compilation-compile.gif http://tuhdo.github.io/static/c-ide/compilation-compile.gif Or built-in GDB integration, also asynchronous: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif. Another GDB screenshot: https://flic.kr/p/6FW7Q7 https://flic.kr/p/6FW7Q7. And Emacs officially supports asynchronous IO, while in Vim it's a hack from Vim Script.
- pmoriarty 12y agoPerry Metzger talks a bit about the problems of emacs blocking starting at the 34'39" mark in his "The Editor of a Lifetime" talk[1] for the NYC Emacs Meetup. Not that his points are new, but this is just one of the first things that sprang to mind when I heard your "it works fine" claim. Here are some excerpts: "Threading. This has been an irritant for me for years. Emacs blocks all windows when you're doing computation in any window. It's an operating system, but not enough of an operating system. I myself will run three instances of Emacs to get around this. I'm slurping in my email and I can't do something at the same time because it's off in space slurping in my email. It's going off and doing some extended computation and I can't go in another window and do anything else at the same time. ... If it's doing extended computation and a lot of file IO and talking to the network, it blocks you. There's not more than one thread there." There's also this[2] discussion of lack of threading in Emacs on the Emacs Wiki. [1] - https://www.youtube.com/watch?v=VADudzQGvU8 https://www.youtube.com/watch?v=VADudzQGvU8 [2] - http://www.emacswiki.org/emacs/NoThreading http://www.emacswiki.org/emacs/NoThreading