guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fibers: operations for waiting until port is readable / writable


From: Maxime Devos
Subject: [PATCH] fibers: operations for waiting until port is readable / writable
Date: Sun, 14 Mar 2021 18:13:23 +0100
User-agent: Evolution 3.34.2

Hi guilers!

This is a patch to guile-fibers that adds
a ‘wait-until-port-readable-operation’ and
‘wait-until-port-writable-operation’ that can
be used to wait until a port (backed by a fd)
becomes readable or writabble respectively.

These operations can be used in combination
with e.g. get-operation, wait-operation and
sleep-operation using choice-operation.
Might be useful for implementing time-outs
and interrupts!

This is a revised version of a buggy patch I
previously posted:

<https://lists.gnu.org/archive/html/guile-user/2021-02/msg00027.html>

I found the bug: I was trying to write to an input-only
port.  That's fixed now, and wait-until-port-X-operation
now verifies the port type.  I also added some documentation
and more tests.

"make distcheck" succeeds.

Greetings,
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]