From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Is it possible to change the recv buffer size dynamically for network process or subprocess? Date: Tue, 24 Mar 2020 10:19:25 -0400 Message-ID: References: <1de1c276-1bda-4ada-b3f4-7adaee296628@Spark> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="11729"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Robert Pluim , emacs-devel@gnu.org To: HaiJun Zhang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 24 15:20:02 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGkPS-0002xP-P5 for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Mar 2020 15:20:02 +0100 Original-Received: from localhost ([::1]:49662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGkPR-0007lX-Ni for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Mar 2020 10:20:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56856) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGkOw-0007DH-Dm for emacs-devel@gnu.org; Tue, 24 Mar 2020 10:19:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGkOv-0000my-Ae for emacs-devel@gnu.org; Tue, 24 Mar 2020 10:19:30 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38306) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jGkOv-0000lu-6g for emacs-devel@gnu.org; Tue, 24 Mar 2020 10:19:29 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8300D1003E2; Tue, 24 Mar 2020 10:19:28 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7BB9F1002FA; Tue, 24 Mar 2020 10:19:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1585059566; bh=T37PaTvD6XG1PE54GK18GGgFZHNaAdSy1IN5r5+mKFg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=D+mJjAKPksNTa4t/a4VnF322SvgOBw7dLoGNimybGL0+d3c7Q75MKIJf5zuVAabE8 YEpJ5lvcg2QbORlDiWGHMEDrhwTMMJthqQUvU4rR/3WcsTqhrhQLWRbFvYyiwpQ13t NV+Ro6yDNo7v/DIVUUMNGZ6KKoPmUFmLSVUHlB8BcFTBToX4HAf6HNwsflwFW+WEsF yHIlFPkjgwOIJ1IcFc1B+eu8l6KrNAm6biPe8Ae/O+q50JcQPkqqI/VyR1A2qnCQ2J OS+ArqMG3Y/Ou05YZykGxoYCMobxHpC929ac4czs1ejHn5E7s4dzB8AdicHZKuC1fU PQAy1HOL4nf6w== Original-Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0307D12027A; Tue, 24 Mar 2020 10:19:25 -0400 (EDT) In-Reply-To: (HaiJun Zhang's message of "Tue, 24 Mar 2020 12:30:00 +0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245760 Archived-At: > If too many data arrives, emacs may be unresponsive. I want to block the > data sender(subprocess) sometimes to keep good responsiveness. So you want a mechanism to control when the process-filter is run, basically (since AFAIK the moment when we consume (at the C/OS level) our input is the same as the moment we run the process filter). Usually this is done implicitly as a side-effect of Emacs being busy, but IIUC you want to temporarily suspend processing your process's input even tho Emacs is not busy? Can you give a concrete scenario you have seen, so we can better understand what could be done? Stefan