From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: NS port thread problems Date: Thu, 21 Oct 2021 08:35:01 +0800 Message-ID: <8735ov8bbe.fsf@yahoo.com> References: <20200129204234.GB60190@breton.holly.idiocy.org> <87k0i8cs59.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20148"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Emacs-Devel devel To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 21 02:38:30 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdM6H-00054z-MI for ged-emacs-devel@m.gmane-mx.org; Thu, 21 Oct 2021 02:38:29 +0200 Original-Received: from localhost ([::1]:35450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdM6F-0008Ty-S5 for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Oct 2021 20:38:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdM3b-00077F-Nz for emacs-devel@gnu.org; Wed, 20 Oct 2021 20:35:44 -0400 Original-Received: from sonic312-25.consmr.mail.ne1.yahoo.com ([66.163.191.206]:34978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdM3W-0003eb-D6 for emacs-devel@gnu.org; Wed, 20 Oct 2021 20:35:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1634776509; bh=f3xrqDbpJ2KKByYApXT0wO4LL341HfX8sTo7A4v88hA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=E74adjpA95qoRuNR9yMVk3QvaAECG300wW7JPes4XWhLvWQNcdY+pCb8a38Ut8Z/dk48LNL4JKkPQI951rduzkQMe4MikVyoIc+QvFD3bM+KcOkbOrX2AHY5aPrbeKC/U3hwE2e4hyKwJlaFSCxX4uVpCM2txOdFr2a+HFmvN6Y7ycvoULFTIhy+aBazL9Hu2yIiLkmGAnXLxrZ+HNAxvct2FEzjDUgzTrj7DMUcICEEuHV/IXf0UZC0w2gah/TMDhT5n+R4m0QJVanRLBNsqyRznccnYXCQVwU61hBsx6o3mV3BqunyV64h39mP7xMGT1NOiGHlvokxxK/Ay9Vjqw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1634776509; bh=M0yWOTkhcZdLxGpFKu9Iv6CelY4HzUlK7Ln5iyiHlB3=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=iFsYhHOgk+Y7sF6dHDmxGv4pAq2+K88z6tWogizjl+pobnNRZcduhRQnMhDek1NAStFQFSzGpmW160Wk0HMJtz5SW6Y3fDvYE1z00qGZPkUrNcitX/etM9Knn3vDjIx6Kq+D4V/MgnC6OeRB0KwzA1AW54m215O40n3FGZ1ySjO52a4BCE10KVxySYN5/KTgy+YWqXdMrDclGK1RypHPoJAQ3RbQa2+8cc076NCF0k7u/kwvw8lHIOeaP+wZ92CK22GAesaiagfHsAakCgVUFp3vmpMT4yRGRYxccvEbUa6e5tiZriXmfdeOKIBg7ebMeDtswBa/+HxdCFIB88Q4ng== X-YMail-OSG: tGUVvg4VM1kdHCtsKwCuxCQ26gtUTbJMUcM8hEHP.5ebEncWUzUys1SRrBT155G CQFnVFVIMRmHWzQSlkGq_De2BPW9uP0hVGiFPxIz.zAo6asrjseAsxi2NAaxiPerVuno5ej9Goeu PhBI8CxURWbD.ef_gLeEBtTsNX6bojMBfgz9zbhDXPkXsQzKD4FudktHgS0qUG0f2aJOshuLAvit 8TK6J6hK8VJ.v4izru.BTl4VZ5npnDhAFONj78KN5bvI0z1dqDPsi1yjs5RBCXR41QpoFJzzmeVZ .ipoWNMZi2dr1g6VFxV0PUlFhcMNKcwPHz_SjVkCYaG6gP5IckKwAvDuGyhRDVpzQCovXKxShJWC QSyxE3T9di_xSKCO9DRdfdsC3Z.5235NE5gle3mwcA9SOvKdPEHzon5YrWez2GDdTxpQNdlkGCyw _ZkkoX_ic2Eu5wY1Ix1Eb9GMtBSwt.eDrArytqOzo9AlLebg_xTixZaj_LNbsMzUf0Sm9HAhcIC. nWqsfJcrn3EL30urcSJY1FpSdfMSNQm3812lk01D4CaBPGsZ43fCoxex2.W.cr8GsE_hrnfa3.MO 3EtV8psD2YKTf_1veAnYnTz4wXWfLA_TL5xiaAYdXLUujP8A_gFs5cRLi03HX65MTYCAaZHZFCOp 4aZiLj9rfdh2JZf.2_N8K4JkRQJTGldmSaghiHGcM064d9DtgJIHjOavRyCXFfF4Q8V5bT23moL0 TwtXyFu1utAU6VDWsj2JpUnUdGfTtuwoG_7ZQeYUzh5CWz8VlWulQEhhC71Z7vZnovxI4hVo0vDS .aVRu35dXd31T13Z6O_bzbcTQRRT7sAkw8LI_.dbi8 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ne1.yahoo.com with HTTP; Thu, 21 Oct 2021 00:35:09 +0000 Original-Received: by kubenode510.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID bec56d5a4e11793d5dd3804443338444; Thu, 21 Oct 2021 00:35:04 +0000 (UTC) In-Reply-To: (Alan Third's message of "Wed, 20 Oct 2021 21:43:41 +0100") X-Mailer: WebService/1.1.19198 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.191.206; envelope-from=luangruo@yahoo.com; helo=sonic312-25.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277484 Archived-At: Alan Third writes: > On Wed, Oct 20, 2021 at 11:05:38AM +0800, Po Lu wrote: > macOS since, I think, 10.14 has required *ALL* GUI work to happen on > the main thread. This is a problem since, if you imagine running: > > (frame-set-width nil 100) > in a thread it will ultimately end up calling ns_set_window_size which > in turn will call "[window setFrame:frameRect display:NO]", which has > to be run in the main thread. ns_set_window_size also calls a number > of other GUI related methods, all of which need to run in the main > thread. > One solution would be to use Objective C "blocks" to run the code in > the main thread, but GCC doesn't support them, so that's out. I'm aware of this feature, but I don't understand how it will allow for running code in the main thread. > I do not think that GNUstep has these limitations, so threads may not > be as prone to crash Emacs using it. Interesting, thanks.