From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: wait_reading_process_ouput hangs in certain cases (w/ patches) Date: Thu, 23 Nov 2017 21:31:08 -0500 Message-ID: References: <83inemrqid.fsf@gnu.org> <398f8d17-b727-d5d6-4a31-772448c7ca0d@binary-island.eu> <56e722a6-95a4-0e42-185c-f26845d4f4bf@binary-island.eu> <21237e45-a353-92f9-01ec-7b51640d2031@cs.ucla.edu> <83vaickfu2.fsf@gnu.org> <83tvxwkexg.fsf@gnu.org> <03261534-6bf5-1a5d-915f-d3c55aaa35e9@binary-island.eu> <206ebefa-7583-f049-140c-c8fd041b0719@cs.ucla.edu> <709614e8-1937-07c1-f554-b453ed4f3d4a@binary-island.eu> <7550438b-9fd4-d374-e571-8bb16456cad5@cs.ucla.edu> <07fdb378-0a42-4980-5614-38afb5ae7749@binary-island.eu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1511490690 1578 195.159.176.226 (24 Nov 2017 02:31:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Nov 2017 02:31:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 24 03:31:26 2017 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 1eI3m0-0008KZ-8y for ged-emacs-devel@m.gmane.org; Fri, 24 Nov 2017 03:31:24 +0100 Original-Received: from localhost ([::1]:46977 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eI3m7-0005Ht-AX for ged-emacs-devel@m.gmane.org; Thu, 23 Nov 2017 21:31:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eI3m1-0005Hk-1Y for emacs-devel@gnu.org; Thu, 23 Nov 2017 21:31:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eI3lx-0003yL-4N for emacs-devel@gnu.org; Thu, 23 Nov 2017 21:31:25 -0500 Original-Received: from [195.159.176.226] (port=45782 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eI3lw-0003vf-Ue for emacs-devel@gnu.org; Thu, 23 Nov 2017 21:31:21 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eI3lm-0007Q3-DK for emacs-devel@gnu.org; Fri, 24 Nov 2017 03:31:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 13 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:iC+jMwp5NbqnsxumuoJJqOTofvw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:220415 Archived-At: > I absolutely agree but quite honestly I was convinced I would get > negative feedback if I did put it in a function of its own, given > how the rest of wait_... looked and in general. So I went with the > duplicated code for exactly that reason. Many Emacs functions (especially in the C code) are much too large. Don't take this as a hint that your code should aim for functions to be as long as possible. On the contrary, making them shorter by moving some of their code to separate functions is welcome. Stefan