From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Add current-suspendable-io-status parameter Date: Wed, 15 May 2019 19:25:37 +0800 Message-ID: References: <20190515100919.GG32396@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="76938"; mail-complaints-to="usenet@blaine.gmane.org" Cc: guile-devel To: tomas@tuxteam.de Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed May 15 13:26:04 2019 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQs2s-000Joh-KT for guile-devel@m.gmane.org; Wed, 15 May 2019 13:26:02 +0200 Original-Received: from localhost ([127.0.0.1]:35447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQs2r-00067i-Jy for guile-devel@m.gmane.org; Wed, 15 May 2019 07:26:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQs2i-00065o-Sl for guile-devel@gnu.org; Wed, 15 May 2019 07:25:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQs2g-0005ba-Vf for guile-devel@gnu.org; Wed, 15 May 2019 07:25:52 -0400 Original-Received: from mail-yb1-xb42.google.com ([2607:f8b0:4864:20::b42]:33959) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQs2g-0005aQ-Aa for guile-devel@gnu.org; Wed, 15 May 2019 07:25:50 -0400 Original-Received: by mail-yb1-xb42.google.com with SMTP id v78so143504ybv.1 for ; Wed, 15 May 2019 04:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ziMutWgyW4PMpkgYQrHj+d3X2ugukzAItWWHXtb03Bc=; b=VGyMLUYg1B1xDO0dKpVDeRihhCxPfiUzu7l4a6N9EkcsPF0YUx608YFvQ5080umfZZ Wf2jAbjSrunlV3K2ywXbI19sMSg0TKpebP/mPh6n4yRZ4Yuvo/knG0I6UV02nveNO8n3 CJIJep8MqE1/u6IEYehKBvNwtM+qFSAAOZ6m1K1Oyj0ho+EA9Lwfgskq/OWIgd1w95AT rCwdbTIISn20hNFd8iFXfpXblmTFaTU2B6jyo2qDAOzcTKX7wlphlAFdoVP5FCJXlXB4 bWX6icCpFoNhPomRI0IN+aqH2RtSGgmSLzZnCxgDagE6hWN2GbBtlwbP1/Cg4xyjyNgA Wouw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ziMutWgyW4PMpkgYQrHj+d3X2ugukzAItWWHXtb03Bc=; b=JTxO0jOc8nX4GJe6Yozyu0TZ7Oi0Aw9khqVqwfFNuG4VyCM9/SwVbRSpZM5xX4qFuE tFjuENG56BVObXYzasxN1DT3FTTfwhzpl2zfmy2fs5/+amQ/bUj6I7mhsLadkY1T4ECT mkMVjlND7mX79GhvnQ+QxAdSV/P/L0CeGgrCt9e/F9TOxrLA41JSAjM0oF8J7Kvcbv2h 6uXNZPuxGIDZkjrkqQmzCA66vqJKHUBZz4lXd4nAb6SBcu+7ylzf+RN9FzHhUf57gxgv +Xde2pWtLPc46vDLU4SE8EQf/awaeDHbNQDX9OdwZoOkXBvieUl1wb5cieO26aF+RP7Q cpOg== X-Gm-Message-State: APjAAAXN/usomaWbnSGod9HuvNT/cqHO03L9AkAOkFy+Z2yY4uTEzzwt Cz/8Q+2P6BzWg/HbXkIVdpZuk1HBnhNGjMzuY9flTtbhEGY= X-Google-Smtp-Source: APXvYqzbYCrHsi56deJFQrUNfsqpDg3tIszF1oOsMpjnsrTdkRPklDZHNkg3MbOidWLuPDiQsEHHgwdJKWojByrW+jk= X-Received: by 2002:a5b:c0d:: with SMTP id f13mr19692185ybq.375.1557919548715; Wed, 15 May 2019 04:25:48 -0700 (PDT) In-Reply-To: <20190515100919.GG32396@tuxteam.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::b42 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19918 Archived-At: hi Tomas! For Guile, if you enabled suspendable-port, you may schedule the blocking task captured by delimited continuation. And use I/O multiplex mechanism (say, select or epoll) for monitoring the file descriptor (or port). If there's no available byte at all, then you would never be mentioned by I/O multiplexer. That is to say, you can do other works before it mentions you some time. On Wed, May 15, 2019 at 6:09 PM wrote: > > On Mon, May 13, 2019 at 06:54:38PM +0800, Nala Ginrut wrote: > > Hi folks! > > Here's a patch to add current-suspendable-io-status: > > Its result is a pair: (finished-bytes . rest-bytes) > > Sorry for this possibly dumb question, but... is there a way > to be non-blocking even if there are no readable/writable > bytes at all? Or would one have to do multi-threading (and > let the single threads [1] block) for that? > > Thanks > > [1] not necessarily "operating system" threads > > -- tom=C3=A1s