The problem is I had to use Atom for a while seriously before I understood how often it failed for me. If you're just trying out a text editor to see if it's comfortable, you don't see these failure modes as clearly. So I've tried VSCode before, but I don't know if it's better or worse at avoiding hanging the UI, because I don't use it constantly all day long with a ton of packages installed.
If I had to make a list of all the times I get frustrated at Emacs, a long operation that has nothing to do with the UI blocking everything is pretty high on the list, that is a regular complaint that I have. I feel comfortable saying that I wish Emacs packages would get better at this, and maybe there are ways to improve it within Emacs.
But I guess truthfully for all I know VS Code could have the same problem but even worse.
I agree that making code preemptive is probably not a good idea.
Sure, it’s possible to write code that doesn’t block the UI, but it’s very difficult in Emacs and just about every built-in functionality is an offender. This includes network operations, which can block forever. You’d be laughed out of the room if you implemented a text editor today that can lock up completely and indefinitely with M-x package-list-packages.
You are right that it is difficult in many respects. But it is far from impossibly difficult. And most of the tricks you could do to make it easier typically lead to some silly hard edge cases in the code.
Me too.
I routinely run emacs on a Raspberry Pi IV building large rust projects
Blocking has never been an issue
I bury the compilation buffer and carry on as usual
The main problem I have is too many options and possibilities
I think a better thing to do is organise all the third party packages with decent documentation
The documentation in the package ecosystem ranges from barely adequate to woeful with the emphasis on the latter
So, yes, you can block the UI thread. There have been ways to not do that basically forever. I welcome better ways to manage this, but there will always be some way to do code on the UI thread, such that it will always be possible to somewhat block things.
The alternative is to make all code preemptive, it seems. And that just begs for race conditions on the shared mutable state that is the editor.