unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@igalia.com>
To: Nala Ginrut <nalaginrut@gmail.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, 30066@debbugs.gnu.org
Subject: bug#30066: 'get-bytevector-some' returns only 1 byte from unbuffered ports
Date: Wed, 10 Jan 2018 18:26:06 +0100	[thread overview]
Message-ID: <87bmi1pqvl.fsf@igalia.com> (raw)
In-Reply-To: <CAPjoZoeUvrAtNQLB7HxL0oXTQoK4p0v3cYX2A8f8aVMaG640FQ@mail.gmail.com> (Nala Ginrut's message of "Thu, 11 Jan 2018 00:58:31 +0800")

On Wed 10 Jan 2018 17:58, Nala Ginrut <nalaginrut@gmail.com> 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





  reply	other threads:[~2018-01-10 17:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 15:02 bug#30066: 'get-bytevector-some' returns only 1 byte from unbuffered ports Ludovic Courtès
2018-01-10 15:59 ` Ludovic Courtès
2018-01-10 16:32   ` Andy Wingo
2018-01-10 16:58     ` Nala Ginrut
2018-01-10 17:26       ` Andy Wingo [this message]
2018-01-10 17:43         ` Nala Ginrut
2018-01-11 14:34     ` Ludovic Courtès
2018-01-11 19:55       ` Mark H Weaver
2018-01-11 21:02         ` Ludovic Courtès
2018-01-11 21:55           ` Mark H Weaver
2018-01-12  9:01             ` Andy Wingo
2018-01-12 10:15               ` Ludovic Courtès
2018-01-12 10:33                 ` Andy Wingo
2018-01-13 20:53                   ` Ludovic Courtès
2018-02-16 13:19                     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bmi1pqvl.fsf@igalia.com \
    --to=wingo@igalia.com \
    --cc=30066@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=nalaginrut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).