Hacker News new | past | comments | ask | show | jobs | submit login

It actually does; support for async io has been there for ages. If you've ever compiled or run git push or run an external command like M-! sleep 10 & RET from Emacs, that's using async io. For things that end up calling an external command like that, the code will typically use `start-process` or `make-process`. For network io, there is `url-retrieve` with callbacks. For tasks that need to be run via emacs-lisp (e.g. sending emails, compiling elisp), there is John Wiegley's `async` library.

However, lots of packages simply don't use these affordances.

Also, for LSP, there's additional challenges since lots of json needs parsing for each request, but IIUC Emacs can't currently process the messages to/from the server while the UI thread is busy (the LSP server can do lots of work while UI is busy, but the communication is stalled until UI is done). Though it seems things will be improving there, hopefully this'll get upstreamed soon: https://www.reddit.com/r/emacs/comments/ymrkyn/async_nonbloc...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: