From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Tue, 26 Jan 2016 11:48:48 -0800 Message-ID: References: Reply-To: John Wiegley NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453837758 18027 80.91.229.3 (26 Jan 2016 19:49:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2016 19:49:18 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 26 20:49:07 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 1aO9bu-0008IE-KZ for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2016 20:49:06 +0100 Original-Received: from localhost ([::1]:46407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO9bt-0001tn-S7 for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2016 14:49:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO9bm-0001rC-PD for emacs-devel@gnu.org; Tue, 26 Jan 2016 14:49:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aO9bh-0008F3-Va for emacs-devel@gnu.org; Tue, 26 Jan 2016 14:48:58 -0500 Original-Received: from mail-pf0-x229.google.com ([2607:f8b0:400e:c00::229]:33045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO9bh-0008ES-O1 for emacs-devel@gnu.org; Tue, 26 Jan 2016 14:48:53 -0500 Original-Received: by mail-pf0-x229.google.com with SMTP id e65so104278249pfe.0 for ; Tue, 26 Jan 2016 11:48:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:in-reply-to:date:message-id:references:user-agent :reply-to:mail-followup-to:mime-version:content-type; bh=LgkhBk40QNKOtJftfBV0zRwNRon3wumzklVJTlir4E8=; b=G3D2HSgR5ILDLQYw5Rb7pDNa7BmVWg2Xpmk3537kroNEf24+gx8hyb2jbkAvwVfIwQ ofOgAQrNg9N9U5NWeY9vXD6ZELvtfL+agIOEsMiQ5b7L+ChNkCahxWV+z0yYuuIUdTOk rNMUjSYq8X2a3qBNS74Fqsls0n2ljOnQ+/gkC2BFje0betiwQMxfy49NZqoJk2jnsOeT CisYVyOkYZIfS6uZDsolc6AQ0bRrcBHfjnqj7G+u049ewBi6PMfsdQk7t5pa8QJ//4L6 B3jjD5pVaeIOgnzQFUufvA8TFEgG8TFPcexQzzKmAHI6L/sj2ps6MK9mAn7+tIctT3zN JChw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:date:message-id :references:user-agent:reply-to:mail-followup-to:mime-version :content-type; bh=LgkhBk40QNKOtJftfBV0zRwNRon3wumzklVJTlir4E8=; b=eK5TtAqcL5OtZU8xthJEqLy52YQtZ9Hvc916up8I0iYsrIbt8xtlPF6LMoS1XXkye5 nacwgWzZeRk/5kqvj/JaHzJtUuYRlzcJn/rINMYctAUCfd6X89pIPZTLSAerZOMKvRlM skBB7foqGmafJMbvtg9oyret/EwRvuYmYyfOKNpVRm4e/kwuAo4k3r3kn6Vozgxg3jBF EKY83JMGYc2bS+bNAA/We+8WIHD0dzJvBNOxX0ZvXM9eh1WKPPvJUuqZq49VPStkOFpJ Th2e2N23DBI1TvyVvuCNojxLFTSE6J2CRHVDII+IE+A0Wgy3cWlKtX1sZeRPgoM38WIy mHQQ== X-Gm-Message-State: AG10YORFUw9f4vdnc9W6sK17ngv+Mt4zrrb2b77fxOKGJSMvpknNougC8a6h+xl6n7OzHg== X-Received: by 10.98.12.21 with SMTP id u21mr36191221pfi.36.1453837732620; Tue, 26 Jan 2016 11:48:52 -0800 (PST) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id cq4sm3610097pad.28.2016.01.26.11.48.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 26 Jan 2016 11:48:51 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id E42A712949F26; Tue, 26 Jan 2016 11:48:50 -0800 (PST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sat, 23 Jan 2016 14:50:54 +0100") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Mail-Followup-To: emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::229 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:198878 Archived-At: >>>>> Lars Magne Ingebrigtsen writes: > 1) Add a new `resolve-name' function that would fork Emacs, call > getaddrinfo/gethostbyname, and do a callback once we get a reply. The > problem is that a forked Emacs is a very strange thing, and is not something > we otherwise do. I looked at this for a day last time, and I couldn't get it > to work, really. Perhaps somebody else could, though. BTW- this exactly what the 'async' library now in GNU ELPA was written to do. You could use it at least as a first approximation. Due to expense, I'd recommend collecting as many names to resolve at a time as you can, and then doing them asynchronously "in batch"; I can think of a few web pages that would suddenly result in 20-30 Emacsen being forked. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2