At Fri, 18 Jun 2021 05:29:14 -0400, George Neuner wrote:
> My point was that the docs for write-bytes-avail et al specifically
> mention "flush" of data, and in a way that implies (to me) that there is
> expected to be something else underlying the buffer to "flush" to, e.g.,
> storage media,
Hi Matthew,
Sorry for the delay in replying.
On 6/17/2021 7:08 PM, Matthew Flatt wrote:
At Wed, 16 Jun 2021 17:33:56 -0400, George Neuner wrote:
>
> Dumb question ... why should non-blocking I/O worry about "flush" at
> all. Why not behave like native I/O where writes are guaranteed only
At Wed, 16 Jun 2021 17:33:56 -0400, George Neuner wrote:
> On 6/16/2021 3:45 PM, Matthew Flatt wrote:
> > At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote:
> > > It looks like the problem
> > > is that "flush" is not defined ...
> >
> > Yes, "returns without blocking after writing as many
Forgot to mention this is using CS 8.1
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on
On 6/16/2021 7:01 PM, Shu-Hung You wrote:
Out of curiosity, I wrapped David's code in a loop and tried to write
509 bytes in each iteration. From the output, it looks like CS doesn't
implement pipes using a fixed-size buffer. I'm also not sure how many
different buffers there are. I think this
Out of curiosity, I wrapped David's code in a loop and tried to write
509 bytes in each iteration. From the output, it looks like CS doesn't
implement pipes using a fixed-size buffer. I'm also not sure how many
different buffers there are. I think this has something to do with
George's question.
On 6/16/2021 3:45 PM, Matthew Flatt wrote:
At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote:
> It looks like the problem
> is that "flush" is not defined ...
Yes, "returns without blocking after writing as many bytes as it can
immediately flush" is vague, and more or less
In case anyone else runs into this issue and is worried about their code
blocking forever, here's a version that will time out. The only change is
the use of sync/timeout and value-evt.
https://docs.racket-lang.org/value-evt/index.html
(require value-evt)
(define bstr (make-shared-bytes 509 5))
Got it. Thanks.
On Wed, Jun 16, 2021 at 3:45 PM Matthew Flatt wrote:
> At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote:
> > It looks like the problem
> > is that "flush" is not defined ...
>
> Yes, "returns without blocking after writing as many bytes as it can
> immediately flush" is
At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote:
> It looks like the problem
> is that "flush" is not defined ...
Yes, "returns without blocking after writing as many bytes as it can
immediately flush" is vague, and more or less intentionally so. The
intent it really "writes as much as
For the record, it doesn't work in 8.1 either.
On Wed, Jun 16, 2021 at 2:44 PM David Storrs wrote:
>
>
> On Wed, Jun 16, 2021 at 2:25 PM George Neuner
> wrote:
>
>>
>> On 6/16/2021 2:16 PM, David Storrs wrote:
>>
>> Damn. Sorry, I posted out of sync versions of code and output. This is
>>
On Wed, Jun 16, 2021 at 2:25 PM George Neuner wrote:
>
> On 6/16/2021 2:16 PM, David Storrs wrote:
>
> Damn. Sorry, I posted out of sync versions of code and output. This is
> correct:
>
> (define bstr (make-shared-bytes 509 5))
> (define rx-pipe-size 16777216)
> (define-values (rx-in rx-out)
On 6/16/2021 2:16 PM, David Storrs wrote:
Damn. Sorry, I posted out of sync versions of code and output. This
is correct:
(define bstr (make-shared-bytes 509 5))
(define rx-pipe-size 16777216)
(define-values (rx-in rx-out) (make-pipe rx-pipe-size))
(define (room-in-rx-pipe? bstr)
(define
Damn. Sorry, I posted out of sync versions of code and output. This is
correct:
(define bstr (make-shared-bytes 509 5))
(define rx-pipe-size 16777216)
(define-values (rx-in rx-out) (make-pipe rx-pipe-size))
(define (room-in-rx-pipe? bstr)
(define avail (- rx-pipe-size (pipe-content-length
On 6/16/2021 1:19 PM, David Storrs wrote:
I'm getting bytes off the wire and attempting to write them to a
port. I have a check in place to verify that the pipe has free space
but when I attempt to reports that yes, there is space, and then it
writes and fails regardless and I'm not sure
I'm getting bytes off the wire and attempting to write them to a port. I
have a check in place to verify that the pipe has free space but when I
attempt to reports that yes, there is space, and then it writes and fails
regardless and I'm not sure why. The following is a simplified version of
the
16 matches
Mail list logo