From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Mon, 25 Jan 2016 16:58:03 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1143f81c49ae28052a24c40e X-Trace: ger.gmane.org 1453712321 20998 80.91.229.3 (25 Jan 2016 08:58:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Jan 2016 08:58:41 +0000 (UTC) Cc: emacs-devel To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 25 09:58:36 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aNcyp-0005xK-Mn for ged-emacs-devel@m.gmane.org; Mon, 25 Jan 2016 09:58:35 +0100 Original-Received: from localhost ([::1]:35953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNcyo-0000cX-4H for ged-emacs-devel@m.gmane.org; Mon, 25 Jan 2016 03:58:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNcyQ-0000WW-76 for emacs-devel@gnu.org; Mon, 25 Jan 2016 03:58:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNcyK-0008HF-U0 for emacs-devel@gnu.org; Mon, 25 Jan 2016 03:58:10 -0500 Original-Received: from mail-vk0-x22b.google.com ([2607:f8b0:400c:c05::22b]:35284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNcyK-0008HB-Oj for emacs-devel@gnu.org; Mon, 25 Jan 2016 03:58:04 -0500 Original-Received: by mail-vk0-x22b.google.com with SMTP id k1so70216145vkb.2 for ; Mon, 25 Jan 2016 00:58:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=lKFrlJIItR+G5sHbJb1HYWwCrPazVrDOVsDnwiSxhWQ=; b=0y9g1r7ynE/tneXfl/UREiDXPOrgLZZwTDWFp4iCz/iuHQvkVJ/D6wOf9gtAxtwO77 zTnruJKApt05vhw9vqs20uehG5d/eiEZPNwKydImXvosuZw3kUt9NN5HNzyvQSpLRfqC uUJc2p341ahbZHUsooDta2QbKPT5JgZVaAZES9XV4mMa+Ves+I2VTHOwOkl4HdTf13FY zMmaH6u/S9f0Sgq7jUcZ+7XQif6B35xIgHBKrXSiC+1RApq+/0PqJXYxQ2jzZyQ5i6gy Ih4aTFE3MwERiGj9PRgsSl5+xsJrCakfi31hUJLgjLaT3KM62t+Glr3WAOJek9sRVfl5 FWvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=lKFrlJIItR+G5sHbJb1HYWwCrPazVrDOVsDnwiSxhWQ=; b=YYg1LcRCDvMAWblzaXexvgPL2iQm1YVWe1kA27aRVhs8qKP1qmkTMG+FTlPcP6QpmJ ckisKUo511CVDd8vBZOV0YzKZcp3sXfBQFXH+gdsm1CV0HsFBmbf5sqwoEA2DmPQT+7h ZjGbr7MGnTYX2QSf8lq88wdjLktMXcKgYiCAehlINslBzhEPacDG3qtJJkCf6ZWJCbFg XRB+FLOINPtEBUgFac5M8lWr4fQOgnRONEc1z+h48RVyw0j++pH41wuIClkiSRrfRM1T ZYdUMvF8RJQdzHCpMIIpVdqkqHMBLoqjBNzz3ZJdH5citkVPYRcU4gNNiX6lmiwgxbsm iluw== X-Gm-Message-State: AG10YOTe2ihi07J2MgsNs+3qEHJUxq4G0fCmo7cPwAnzp4QTALXOizbC2Fjc7MtHHwpbvnGLZqzJmUedCRkKxQ== X-Received: by 10.31.49.138 with SMTP id x132mr9690739vkx.33.1453712283903; Mon, 25 Jan 2016 00:58:03 -0800 (PST) Original-Received: by 10.103.80.28 with HTTP; Mon, 25 Jan 2016 00:58:03 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198752 Archived-At: --001a1143f81c49ae28052a24c40e Content-Type: text/plain; charset=UTF-8 On 25 January 2016 at 05:17, Lars Magne Ingebrigtsen wrote: > There's no problem doing non-Lisp things in a separate thread. But > doing anything that calls Lisp stuff from the non-main thread is, if I > understand things correctly, highly iffy. > > Which makes things rather awkward. Thank you for the information. Don't you think it would make sense to add some kind of standardised functionality to Emacs that allows native code running in a thread to asynchronously call a callback function in the Lisp code? The function would be added to the event queue to be run in the Emacs main thread at some point in the future. In essence, I'm suggesting something similar to SwingUtilities.invokeLater() from Java. Regards, Elias --001a1143f81c49ae28052a24c40e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 2= 5 January 2016 at 05:17, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
=C2=A0
There's no= problem doing non-Lisp things in a separate thread.=C2=A0 But
doing anything that calls Lisp stuff from the non-main thread is, if I
understand things correctly, highly iffy.

Which makes things rather awkward.

Thank yo= u for the information.

Don't you think it woul= d make sense to add some kind of standardised functionality to Emacs that a= llows native code running in a thread to asynchronously call a callback fun= ction in the Lisp code? The function would be added to the event queue to b= e run in the Emacs main thread at some point in the future.

<= /div>
In essence, I'm suggesting something similar to SwingUtilitie= s.invokeLater() from Java.

Regards,
Elia= s
--001a1143f81c49ae28052a24c40e--