[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 204/324: mq-impl/stream: Document implementation pitfall
From: |
gnunet |
Subject: |
[gnunet-scheme] 204/324: mq-impl/stream: Document implementation pitfall. |
Date: |
Tue, 21 Sep 2021 13:24:04 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit 774d32465f8a81c2b7316e0957e80e0cccbe54df
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sat Aug 28 12:10:38 2021 +0200
mq-impl/stream: Document implementation pitfall.
* gnu/gnunet/mq-impl/stream.scm
(port->message-queue): Document it in the write fiber.
---
gnu/gnunet/mq-impl/stream.scm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gnu/gnunet/mq-impl/stream.scm b/gnu/gnunet/mq-impl/stream.scm
index 14c1931..a050f74 100644
--- a/gnu/gnunet/mq-impl/stream.scm
+++ b/gnu/gnunet/mq-impl/stream.scm
@@ -312,6 +312,14 @@ XXX: Likewise for connect/fibers?"
(perform-operation
(choice-operation
(prepare-await-trigger! rcvar)
+ ;; Don't wait for the port to be writable here!
+ ;;
+ ;; Otherwise, if the port is writable, but the message
+ ;; queue has nothing buffered for a while, the fiber
+ ;; keeps spinning.
+ ;;
+ ;; XXX it would be nice if it could be detected when the
+ ;; write end of the port is closed.
escape-when-closed-operation)))
(define (wait!/blocking)
(perform-operation wait-writable-operation))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] 220/324: mq-impl/stream: Extract code to be shared with connect/fibers., (continued)
- [gnunet-scheme] 220/324: mq-impl/stream: Extract code to be shared with connect/fibers., gnunet, 2021/09/21
- [gnunet-scheme] 226/324: doc: Generate PDF and HTML documentation, gnunet, 2021/09/21
- [gnunet-scheme] 227/324: mq: Remove TODOs about hypothetical &malformed-message., gnunet, 2021/09/21
- [gnunet-scheme] 229/324: guix: Import missing module., gnunet, 2021/09/21
- [gnunet-scheme] 194/324: mq-impl/stream: Eliminate atomic box., gnunet, 2021/09/21
- [gnunet-scheme] 191/324: doc: Document message queue error handling., gnunet, 2021/09/21
- [gnunet-scheme] 216/324: mq: Inject errors if no appropriate message handler exists., gnunet, 2021/09/21
- [gnunet-scheme] 190/324: Correct XXX and TODO on input:regular-end-of-file., gnunet, 2021/09/21
- [gnunet-scheme] 196/324: mq-impl/stream: Stop all fibers when EOF is reached (part 1)., gnunet, 2021/09/21
- [gnunet-scheme] 201/324: tests/mq-stream: Make test more strict., gnunet, 2021/09/21
- [gnunet-scheme] 204/324: mq-impl/stream: Document implementation pitfall.,
gnunet <=
- [gnunet-scheme] 214/324: tests/mq: Use 'message-handler' macro., gnunet, 2021/09/21
- [gnunet-scheme] 217/324: tests/mq: Spam the log less., gnunet, 2021/09/21
- [gnunet-scheme] 233/324: doc: Document the message type database a little., gnunet, 2021/09/21
- [gnunet-scheme] 232/324: doc: Partially document handler procedures and interposers., gnunet, 2021/09/21
- [gnunet-scheme] 239/324: tests/network-size: Don't let the GC close port., gnunet, 2021/09/21
- [gnunet-scheme] 241/324: nse/client: Add a 'disconnected' callback., gnunet, 2021/09/21
- [gnunet-scheme] 195/324: mq-impl/stream: Reduce nesting., gnunet, 2021/09/21
- [gnunet-scheme] 200/324: mq-impl/stream: Make error injection less unobviously correct., gnunet, 2021/09/21
- [gnunet-scheme] 210/324: mq-stream: Reuse 'type' variable instead of reading the type again., gnunet, 2021/09/21
- [gnunet-scheme] 219/324: mq-impl/stream: Create the message queue as late as possible., gnunet, 2021/09/21