* [PATCH] fibers: operations for waiting until port is readable / writable
@ 2021-03-14 17:13 Maxime Devos
0 siblings, 0 replies; only message in thread
From: Maxime Devos @ 2021-03-14 17:13 UTC (permalink / raw)
Cc: guile-user
[-- Attachment #1: Type: text/plain, Size: 833 bytes --]
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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-14 17:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14 17:13 [PATCH] fibers: operations for waiting until port is readable / writable Maxime Devos
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).