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