From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Mon, 25 Jan 2016 17:51:30 +0200 Message-ID: <83lh7d3bel.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1453737091 9569 80.91.229.3 (25 Jan 2016 15:51:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Jan 2016 15:51:31 +0000 (UTC) Cc: larsi@gnus.org, emacs-devel@gnu.org To: Elias =?utf-8?Q?M=C3=A5rtenson?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 25 16:51:27 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 1aNjQK-0003Db-Tv for ged-emacs-devel@m.gmane.org; Mon, 25 Jan 2016 16:51:25 +0100 Original-Received: from localhost ([::1]:39384 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNjQJ-000198-Vx for ged-emacs-devel@m.gmane.org; Mon, 25 Jan 2016 10:51:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNjQ5-00018q-Ik for emacs-devel@gnu.org; Mon, 25 Jan 2016 10:51:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNjQ1-0007Rq-I2 for emacs-devel@gnu.org; Mon, 25 Jan 2016 10:51:09 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNjQ1-0007Rm-ET; Mon, 25 Jan 2016 10:51:05 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4734 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aNjQ0-0006n3-M3; Mon, 25 Jan 2016 10:51:05 -0500 In-reply-to: (message from Elias =?utf-8?Q?M=C3=A5rtenson?= on Mon, 25 Jan 2016 16:58:03 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:198777 Archived-At: > Date: Mon, 25 Jan 2016 16:58:03 +0800 > From: Elias MÃ¥rtenson > Cc: emacs-devel > > 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. The challenge with this scheme is to come up with the way to add an event to the Emacs event queue from another thread. Once the event is in the queue, all the rest is simple. However, the event queue is not currently designed to accept events from other threads. Maybe you should take a look at the concurrency branch.