[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[WIP PATCH] (for fibers): wait-until-port-readable-operation / wait-unti
From: |
Maxime Devos |
Subject: |
[WIP PATCH] (for fibers): wait-until-port-readable-operation / wait-until-port-writable-operation |
Date: |
Sun, 14 Feb 2021 17:20:22 +0100 |
User-agent: |
Evolution 3.34.2 |
Hi Guilers,
This is a (buggy) patch to guile-fibers that adds
a ‘wait-until-port-readable-operation’ and ‘wait-until-port-writable’
that can be used to wait until a port (backed by a fd) becomes readable
or writable respectively.
Now I seem to have hit a problem: the first few tests (more to be written
later) pass just fine, but the following test never completes:
;; XXX why does this hang? Shouldn't there
;; be a time-out?
(assert-run-fibers-returns (#f)
(writable/timeout A))
(writable/timeout is a combination of wait-until-port-writable and
sleep-operation, that also retries a few times to allow for spurious
wakeups.)
Oddly, the same test but with readable/timeout completes just fine.
Any thoughts? (Warning: I don't know what I'm doing; I'm not
familiar with relevant literature on operations, I'm just trying
to complete wingo's proposal).
Wild guess: maybe schedule-task-when-fd-writable prevents the fiber
from being resumed by other causes?
Greetings,
Maxime.
0001-WIP-Implement-operations-for-waiting-for-readability.patch
Description: Text Data
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [WIP PATCH] (for fibers): wait-until-port-readable-operation / wait-until-port-writable-operation,
Maxime Devos <=