On Sun, Nov 01, 2020 at 05:28:43PM +0000, Alan Third wrote: > On Sun, Nov 01, 2020 at 11:50:32AM +0100, Mattias Engdegård wrote: > > > If anyone else has a simpler solution I'd love to hear it. > > > > Maybe we are overthinking it. I don't think the Cocoa event loop > > really is running in a different thread. Anecdotal evidence > > (printf!) indicates that it isn't. > > On the Mac port? It certainly isn't on the NS port... I don't think > the Mac port even really uses the Cocoa event loop, although I could > easily be wrong. > > > (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32864#38 has a > > previous investigation into the matter.) > > > > I just did the simplest thing possible and it works (with a slight > > latency at times, but perhaps tolerable). I'd like to know what's > > wrong with running Lisp in the event loop. It does appear safe to > > me. > > We used to have a *lot* of crashes that were related to the event loop > and lisp and so on, but if you're confident it isn't a problem feel > free to propose a patch and we can give it a go on master. OK, I've had a go at this and tried removing EVERYTHING related to the delayed menu stuff and, as you say, it seems fine, but I barely ever use the menus, so I could be missing something. For the record, the menu code (or maybe it's the toolbar, but I suspect the menus) kills GNUstep builds stone dead as soon as you try typing anything. It looks from the debugger like Emacs is still running, but it just won't update the screen. Turning off the menus appears to fix it. -- Alan Third