all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Creating a separate GUI thread for NS
Date: Sat, 27 Jan 2018 11:14:57 +0000	[thread overview]
Message-ID: <20180127111457.GA66552@breton.holly.idiocy.org> (raw)

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	other threads:[~2018-01-27 11:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-27 11:14 Alan Third [this message]
2018-01-27 11:33 ` Creating a separate GUI thread for NS Eli Zaretskii
2018-01-28 17:00   ` Philipp Stephani
2018-01-29 17:56     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180127111457.GA66552@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.