From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.bugs Subject: bug#30066: 'get-bytevector-some' returns only 1 byte from unbuffered ports Date: Thu, 11 Jan 2018 01:43:34 +0800 Message-ID: References: <87zi5lrc3x.fsf@gnu.org> <87tvvtr9ge.fsf@gnu.org> <87fu7dptdn.fsf@igalia.com> <87bmi1pqvl.fsf@igalia.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1515606146 12334 195.159.176.226 (10 Jan 2018 17:42:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 Jan 2018 17:42:26 +0000 (UTC) Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 30066@debbugs.gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Jan 10 18:42:22 2018 Return-path: Envelope-to: guile-bugs@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 1eZKO9-000243-GQ for guile-bugs@m.gmane.org; Wed, 10 Jan 2018 18:42:09 +0100 Original-Received: from localhost ([::1]:56362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZKQ9-0004RY-0b for guile-bugs@m.gmane.org; Wed, 10 Jan 2018 12:44:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZKQ3-0004RA-9n for bug-guile@gnu.org; Wed, 10 Jan 2018 12:44:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZKPy-0005qY-A9 for bug-guile@gnu.org; Wed, 10 Jan 2018 12:44:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43354) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZKPy-0005qN-5c for bug-guile@gnu.org; Wed, 10 Jan 2018 12:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eZKPx-0006JX-Sk for bug-guile@gnu.org; Wed, 10 Jan 2018 12:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Nala Ginrut Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 10 Jan 2018 17:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30066 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 30066-submit@debbugs.gnu.org id=B30066.151560622224238 (code B ref 30066); Wed, 10 Jan 2018 17:44:01 +0000 Original-Received: (at 30066) by debbugs.gnu.org; 10 Jan 2018 17:43:42 +0000 Original-Received: from localhost ([127.0.0.1]:51251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZKPe-0006Is-Id for submit@debbugs.gnu.org; Wed, 10 Jan 2018 12:43:42 -0500 Original-Received: from mail-yb0-f181.google.com ([209.85.213.181]:33743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZKPc-0006If-OE for 30066@debbugs.gnu.org; Wed, 10 Jan 2018 12:43:40 -0500 Original-Received: by mail-yb0-f181.google.com with SMTP id f16so7745248ybn.0 for <30066@debbugs.gnu.org>; Wed, 10 Jan 2018 09:43:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TgDC9JPEYHxMx3GEzToqqh74Kpi5g7+XI6LFgwMvzlg=; b=gkJuetutAuuVRraYqMuhwf2OTYlFtRDN+bHKm4eoWUOCErL0dCOEPNMrQakIO4zW2h FtWCukFASWiWGL6T7bkaWq6oZDB7XcfeY5Om4rZO+3/TJ5VGHa66grUYeb84g/XsODru RQxn1HPZqTfQLGkkY03zYgQk3+/aSnNXnuowKZz3fhNTCZvPLT+ocF3fBvQRAIOv+GfV p9f5Ba6RDrI7Wy/XQwRlxMs/30eEKeCJ08UNwigijkeBjdGWEEVk90wf+FyXzSVygK4H TkUWtzajXFtgC6zW7/oRb4czaZOiV/rq2WVJ6q54a0nFv9Y5A1h0I0ss8ln/48VUJ1ru ysWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TgDC9JPEYHxMx3GEzToqqh74Kpi5g7+XI6LFgwMvzlg=; b=ba/5RLjz6WXNxki/6TuAZ8DiHDamXSZ0ZdXPYv8LHyWB8NBDuS1ulM9v6mgf7bIYC3 uW4uKgIsKRA4phw4BHGehfvnbYVoeqYZYKAx9o9RIEHKQ2GAP75XtuU+6Q0hzYEI3fvU DiDY+2/kflEYCTYgr3RVkiqgpPaPUvGmcsLQJXAlp2oToHA2h4hQLdZChPm8GgxWqfXz LLvTDMlTWiaF9+GU5gqnu+l2YxEuxtyQ0sg9HOS5XebhZLKzZmIf0FhDe6Et/CnK0YSC aesZLTcGW6Q6mQBhsk15w6kIGUJOY+TnR0YMDM9RshHidB64HLBqeEgngJTtWuha9wib gwXw== X-Gm-Message-State: AKGB3mJsahr20V4WyIkzaDQYajK8DVLs4WR3kJ0yjvXIpQbFli0s7j5n 7O/8d0YM/sq+Oi7/PQPT944cFs5IzQkKaa6x3CY= X-Google-Smtp-Source: ACJfBou6hItuIBeoHlNiBIdLKQZuA9rFxTTK4h2tnc37p0f0Io1nODAYTTmjfHOfig6Kw7z7KutGcn4KgQkvvlXXs78= X-Received: by 10.37.172.97 with SMTP id r33mr18186065ybd.93.1515606215024; Wed, 10 Jan 2018 09:43:35 -0800 (PST) Original-Received: by 10.37.11.137 with HTTP; Wed, 10 Jan 2018 09:43:34 -0800 (PST) In-Reply-To: <87bmi1pqvl.fsf@igalia.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8956 Archived-At: Ah, thanks for that work! On Thu, Jan 11, 2018 at 1:26 AM, Andy Wingo wrote: > On Wed 10 Jan 2018 17:58, Nala Ginrut writes: > >> hi Andy and Ludo! >> >> What if developers enabled suspendable-ports and set the port to non-blocking? >> For example, in the non-blocking asynchronous server, I registered >> read/write waiter for suspendable-ports. And save >> delimited-continuations then yield the current task. >> In this situation, get-bytevector-n! will read n bytes with several >> times yielding by the registered read-writer, from the caller's >> perspective, get-bytevector-n! will return n bytes finally no matter >> how many times it's yielded. >> But how about the get-bytevector-some? Should it block just once and >> return the first time read m bytes then return? > > I think this is right. At most one block. FWIW we'd need to add > support for get-bytevector-some to (ice-9 suspendable-ports) to get this > to work. > > Andy