From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: Creating a separate GUI thread for NS Date: Sun, 28 Jan 2018 17:00:53 +0000 Message-ID: References: <20180127111457.GA66552@breton.holly.idiocy.org> <83h8r7k03k.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c1a68282c39ef0563d913f4" X-Trace: blaine.gmane.org 1517158964 1604 195.159.176.226 (28 Jan 2018 17:02:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 Jan 2018 17:02:44 +0000 (UTC) Cc: Alan Third , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 28 18:02:40 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efqLZ-0007ee-Bx for ged-emacs-devel@m.gmane.org; Sun, 28 Jan 2018 18:02:25 +0100 Original-Received: from localhost ([::1]:49406 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efqNa-0005sy-4J for ged-emacs-devel@m.gmane.org; Sun, 28 Jan 2018 12:04:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efqKK-0004KV-Ps for emacs-devel@gnu.org; Sun, 28 Jan 2018 12:01:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efqKK-00068P-2L for emacs-devel@gnu.org; Sun, 28 Jan 2018 12:01:08 -0500 Original-Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:45622) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efqKI-00066T-95; Sun, 28 Jan 2018 12:01:06 -0500 Original-Received: by mail-lf0-x22f.google.com with SMTP id x196so6593778lfd.12; Sun, 28 Jan 2018 09:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9bmBhiGoJDLvQBuVQuHM0rUY3oxJslg0BqGSoEb30t4=; b=n4Su7IxXt+/OAMeSf6d2VAU5vZMBa49+JyFvPS5u3QO6f0VWa9Z9kNvn8yVkoP5ylM 48+FeArKLH1bMGIf1ewIwpIptCcuyF1W4EFmmJxvk/YpTYlJsaaJBWGDgIPIy3hCR0q8 EWkpwVcBgmtdOJ/wptjmilDpvaArIGsfq2kBQpd+o0mgHvdywcXazaFTI5s+2BIlJqd6 INBMq1OnYdfogch6j5rEvUA7qY4YvrIBYkH6NfVrXx6eDpfiTctOJu7B0kOexFquVtU1 57xB3TNz6TAHSYR8qqgCWDaHI+rfC9zUF2+NdtN5hbqC3w00dYuEVH4IENcVxsIQTrWG XQMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9bmBhiGoJDLvQBuVQuHM0rUY3oxJslg0BqGSoEb30t4=; b=tc/7gl/ve1Fr3zlKy2APPou3KXvTgdNgu4X1X2rZuWwPyBFt92Dvgij4GL1qn6Z2Ng 7VOGIqHkNeuv/Y9LYoTQ1HrmV8HuGX3NUyyaudTq8tvPRd7aer0mBQgMmugLYWzRv5if qy39mOYq00oM5jMBZmqU0GAeACx8MdKusUnY/w3hNsihPHphMZJAoINuau7I8LC7JF/0 /8B/yxNutDcVklax4ltIm2SiilpKW7ZD2JFGGCdwkLyAgsYX9/8DWOgY3UjJG9EipsPz iVrRECfMWeUA9UOjEK+luWAoEGrxzzTJsPtxa6/RctzcrmqwOjGk+QNtwbMzDUpMbdhw FKjw== X-Gm-Message-State: AKwxytddkQQ3nyW2G+TgPDtkEcyU9Wg1RMtrAJVJytYoQnfkMah2bDWE oZm92otRVh7VuDu1A7xbSnRYqIAOSSRSON6F4zd0sQ== X-Google-Smtp-Source: AH8x224QYfUT/0owrE14TIQ5j6Fsu6bAjUwOjvNN893yQrH35opBZhNyOxAFd4zebhomAVYmErSLz5yO6wsi/B6G1P4= X-Received: by 10.46.68.93 with SMTP id r90mr4019002lja.13.1517158864270; Sun, 28 Jan 2018 09:01:04 -0800 (PST) In-Reply-To: <83h8r7k03k.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222273 Archived-At: --94eb2c1a68282c39ef0563d913f4 Content-Type: text/plain; charset="UTF-8" Eli Zaretskii schrieb am Sa., 27. Jan. 2018 um 12:34 Uhr: > > > 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? > > You should consider which thread gets the signals (or their > equivalents). Emacs currently assumes its the main thread, and that's > what you see in sysdep.c. But some other traces of this assumption > are elsewhere, so you should carefully review any code that is related > to signals. Could we switch signal processing to a simpler model, such as a background thread and sigwait? --94eb2c1a68282c39ef0563d913f4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Sa., 27. Jan. 2018 um 12:34=C2=A0Uhr:

> 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?

You should consider which thread gets the signals (or their
equivalents).=C2=A0 Emacs currently assumes its the main thread, and that&#= 39;s
what you see in sysdep.c.=C2=A0 But some other traces of this assumption are elsewhere, so you should carefully review any code that is related
to signals.

Could we switch signal processi= ng to a simpler model, such as a background thread and sigwait?=C2=A0
=
--94eb2c1a68282c39ef0563d913f4--