From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Can we go GTK-only? Date: Mon, 31 Oct 2016 14:22:50 -0400 Message-ID: References: <24db2975-17ca-ad01-20c8-df12071fa89a@dancol.org> <4615E73A-19E2-4B79-9889-D3FA686DDDE6@raeburn.org> <83bmy0pl8p.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1477939349 19159 195.159.176.226 (31 Oct 2016 18:42:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 31 Oct 2016 18:42:29 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 31 19:42:23 2016 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 1c1HXA-00037l-Uv for ged-emacs-devel@m.gmane.org; Mon, 31 Oct 2016 19:42:13 +0100 Original-Received: from localhost ([::1]:37840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1HXD-0002w7-46 for ged-emacs-devel@m.gmane.org; Mon, 31 Oct 2016 14:42:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1HEY-0002wZ-3s for emacs-devel@gnu.org; Mon, 31 Oct 2016 14:22:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1HEU-00080e-2o for emacs-devel@gnu.org; Mon, 31 Oct 2016 14:22:58 -0400 Original-Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]:36167) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1HET-00080O-To for emacs-devel@gnu.org; Mon, 31 Oct 2016 14:22:53 -0400 Original-Received: by mail-qt0-x234.google.com with SMTP id w33so37284520qtc.3 for ; Mon, 31 Oct 2016 11:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/xR9llicWo4GzGbJ3g5gBox1xbArWCoMXWkX05uEOds=; b=05c9oLke+G5AAnIbpI5NV783icahWkBaG4T3ElfbUVMoZG0PIJYp6nlvzqZZR6Ycpa t3njA3XSJq1X01rUKg83gf5qftcxkODQz7jjrCqTMxyOTvHhWG/uzoBghGu/a63Fe2ev s7cevo75V0OlCInUijiNa3xpwiaB3xzpXMFpvjnPxloT+Vk6D9pLJonriJw3qCZHNMo2 0NqyLBnRJjYJtKiLMwGn9xGJpmI48qqrOEch7OV9NzOJLbCzKHUh7Bz5zbkDeuz1mZxn FamFODOrfQRsgveE2wnxOgRIKSqPZSZ98doN7AurdivjDfpdbHjvI672R5heB4XfeX6j KTgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/xR9llicWo4GzGbJ3g5gBox1xbArWCoMXWkX05uEOds=; b=E3m/AbEOnFwXrnJFl19TclKVq0s7C+MchawYPeAfS3hjNTqkLj7bzCPPRoK9o62hji T9HrWSANsHmc2v1RiT/xUjO6uiLCx5egyjh2j/YLW6oLRo/hQ2EWA7gJxXtz5TtCbC72 ez3qpTQpd0gzdhMmY/bFOzZWHLBQsXuE4+MDBP2be0WPEDi6+dsjkevX5fCiXoddBRzU YzttTUJNRNVvVj8vfx3Z5poWa2kEvtXT3AJjgda40QvuLr1flJC8Dah5HZAAryhpX+j1 dpPHL2z7G943B+hLbyjlBf8hoHmZqmjf4M1AzBubVImlVDjjzKLoo31pQ5+bYqFbXVpx Vc8A== X-Gm-Message-State: ABUngvckVcD+LFx4YlFbW2ZErCJwKee7cc9TxZpFYc0xZU/HThYFerdW8sLfDxaDTQaxEQ== X-Received: by 10.200.36.125 with SMTP id d58mr6348598qtd.126.1477938173067; Mon, 31 Oct 2016 11:22:53 -0700 (PDT) Original-Received: from [192.168.23.52] (c-50-138-183-136.hsd1.ma.comcast.net. [50.138.183.136]) by smtp.gmail.com with ESMTPSA id c189sm13895119qkg.21.2016.10.31.11.22.51 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Oct 2016 11:22:52 -0700 (PDT) In-Reply-To: <83bmy0pl8p.fsf@gnu.org> X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::234 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:209034 Archived-At: On Oct 31, 2016, at 11:54, Eli Zaretskii wrote: > One problem with > having too much code in separate threads is that only the main thread > can call malloc/free, i.e. you cannot create/destroy objects in other > threads. Wow. Is that a Windows limitation? It=E2=80=99s certainly not true = under POSIX threads. Creating Lisp objects, that=E2=80=99d be another matter, unless locking = is introduced to the allocator. > Another problem is calling QUIT: you need to switch to the > main thread before you do that, or else you will crash. Yes, quit checking, generation, and inhibition would all need to be = reviewed. > And there are > probably other limitations. Probably. I doubt any are insurmountable. > The w32 build uses a separate thread for receiving the window-system > events, so you might look there for some ideas that won't blow up the > basic MVC design of Emacs. In a nutshell, the events received by the > w32 input thread are pushed onto a queue which is serviced by an > emulation of a socket-read hook, called from keyboard.c, like all the > other such hooks. Seems like a good place to start. > Of course, this doesn't help when the main thread is busy doing > something prolonged, because it then doesn't get to processing the > input events. Yeah, in cases like that it=E2=80=99d be no better than today. Ken=