emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating a separate GUI thread for NS


From: Alan Third
Subject: Creating a separate GUI thread for NS
Date: Sat, 27 Jan 2018 11:14:57 +0000
User-agent: Mutt/1.9.1 (2017-09-22)

Cocoa and GNUstep have this thing called a ‘run loop’, that handles
all the GUI windows and IO and so on. At the moment we have a
complicated system where we run it from ns_select, while the real
select runs in a separate thread, and we then synchronise them with
message passing.

There are some unfortunate side effects like not being able to update
the frame while it’s being resized because we can’t break out of the
run loop to run redisplay.

The sensible thing to do would be to move the run loop to its own
thread. I believe we do something similar on Windows.

The problem is that Cocoa insists the run loop *must* be run on the
main thread, and Emacs also insists that *it* runs on the main thread.

Is there a way to get Emacs to run on a child thread? Is it just a
case of resetting main_thread_id in sysdep.c?

Thanks!
-- 
Alan Third



reply via email to

[Prev in Thread] Current Thread [Next in Thread]