From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Sun, 24 Jan 2016 18:16:14 +0100 Organization: Programmerer Ingebrigtsen Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453655819 29371 80.91.229.3 (24 Jan 2016 17:16:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Jan 2016 17:16:59 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 24 18:16:53 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 1aNOHU-0000QG-NH for ged-emacs-devel@m.gmane.org; Sun, 24 Jan 2016 18:16:52 +0100 Original-Received: from localhost ([::1]:32933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNOHQ-0005ZQ-IW for ged-emacs-devel@m.gmane.org; Sun, 24 Jan 2016 12:16:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNOH5-0005VT-O4 for emacs-devel@gnu.org; Sun, 24 Jan 2016 12:16:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNOH2-0001AC-H6 for emacs-devel@gnu.org; Sun, 24 Jan 2016 12:16:27 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:52901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNOH2-0001A8-AI for emacs-devel@gnu.org; Sun, 24 Jan 2016 12:16:24 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aNOH0-0000EB-9T for emacs-devel@gnu.org; Sun, 24 Jan 2016 18:16:22 +0100 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Jan 2016 18:16:22 +0100 Original-Received: from larsi by cm-84.215.1.64.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Jan 2016 18:16:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.1.64.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAADFBMVEXmbwryjxH7vhy6PQdD 1ZnqAAACOUlEQVQokR3SP2gTURwH8N/z/khKy6U0F0wWcVHpFEGdCpc0aUCx5GLuRXMIaquR3FQd pdDTasFFRXLBBIdackneWwRnIVdjlhDJYpdsgi6drhXrcvH56m/7wPfLd/lBUsUWpS3qYLMNqSLG xzCMeBtQKcNBKX491QSEk1FK72OcnOpwQLZBUpW9hUEHJIyiptsoJdiAgHQPFedrlKyxMQHVALVc p+7GaJ+jCoZ1nTobzOTQwym6SBwteP8fF0h2Z3sUuCVQM3qffHyaZn9nfwKeXZffdHWfHTy8Ahgd yO4rxtif3WWIgBcqFXJc3zkS3q7ZHnHcWQbB6/2Yd4OI9vnuDKSF4aLpTiIs5qzDtODLxc6lQtB6 sQEJpRezOpc3D52bGvhsRjWNR92Q+Y6B4HuqIdl+jG4zUEYZ9ZZcU1dolQHzAF/sU6tGDQ4RjC99 Um7QGwEEYbQqqm4lTh74EOiokDifr1x1b/vgX/tdEKjqUueTBz6g3Dmr+LLx3BeBCVLubJ3MW/o3 EYYJKXeU3SZ02sjDgictaePHreaJaoqPhpB+ar/VjmEdRl5ErZymrl7CSWA+MioTDtwUeGzPaR/R FRuTHngQdT4Mdrbs4lsAb0Z2uuaWbOebHCA7LKZGbZxXONDm5Ay27CWJcUA3g7LWE1HsAb9De21A 7VkQwAsrkjE3ps/Ek8edAPR0nFZFgUOYLObBotiY0yCsfEVCOM7fJf0LwtpQYtNxUq4qIwAFpYda tG7pivIPCUH8fpOoqUYAAAAASUVORK5CYII= Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:nln67fiife0RFvBV/mL6P3oTkrA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:198710 Archived-At: I've been reading make-network-process, and it's, er, complicated code. Three levels of nesting #ifdefs. But I think it can be separated into two functions without breaking too much -- one that does (or starts doing) name resolution, and one that calls connect (and the stuff after that). Doing asynch DNS can be triggered by the existing :nowait parameter without breaking any existing callers, I think. So: If called without :nowait, the first half of the function will call the second one directly. If called with :nowait, the second half of the function will be called from within the bowels of wait_reading_process_output somewhere. Sound like a plan? If so I'll start implementing on... I think Wednesday. I may need some help on the autoconf stuff for getaddrinfo_a, though. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no