[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 32/42: server: Add type checking to make-loop.
From: |
gnunet |
Subject: |
[gnunet-scheme] 32/42: server: Add type checking to make-loop. |
Date: |
Sat, 10 Sep 2022 19:08:25 +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 fa0f2f49e832d80f291cb97e9a2f176b479dbe30
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sat Sep 10 13:06:14 2022 +0200
server: Add type checking to make-loop.
---
gnu/gnunet/server.scm | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/gnu/gnunet/server.scm b/gnu/gnunet/server.scm
index 13be42d..b9b952f 100644
--- a/gnu/gnunet/server.scm
+++ b/gnu/gnunet/server.scm
@@ -31,21 +31,23 @@
loop:spawner loop:lost-and-found run-loop spawn-server-loop)
(import (only (rnrs base)
begin define cons case else apply values quote lambda
- if error list let and append)
+ if error list let and append assert string? procedure?)
(only (rnrs records syntactic)
define-record-type)
(only (fibers)
spawn-fiber)
(only (fibers conditions)
- make-condition wait-operation signal-condition!)
+ make-condition wait-operation signal-condition! condition?)
(only (fibers channels)
make-channel put-operation get-operation put-message
- get-message)
+ get-message channel?)
+ (only (gnu gnunet config db)
+ configuration?)
(only (fibers operations)
choice-operation perform-operation wrap-operation)
(only (gnu gnunet concurrency lost-and-found)
make-lost-and-found collect-lost-and-found-operation
- losable-lost-and-found)
+ losable-lost-and-found lost-and-found?)
(only (gnu gnunet mq)
close-queue!)
(only (gnu gnunet mq error-reporting)
@@ -188,6 +190,16 @@ this maybe-sends @code{disconnect!} to the control
channel."
control-channel lost-and-found (connected values)
(disconnected values)
#:allow-other-keys)
+ (assert (string? service-name))
+ (assert (procedure? control-message-handler))
+ (assert (procedure? make-message-handlers))
+ (assert (configuration? configuration))
+ (assert (procedure? spawn))
+ (assert (condition? terminal-condition))
+ (assert (channel? control-channel))
+ (assert (lost-and-found? lost-and-found))
+ (assert (procedure? connected))
+ (assert (procedure? disconnected))
(%make service-name control-message-handler
make-message-handlers make-error-handler* configuration
spawn terminal-condition control-channel
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] 15/42: server: New procedure for making the arguments to make-loop., (continued)
- [gnunet-scheme] 15/42: server: New procedure for making the arguments to make-loop., gnunet, 2022/09/10
- [gnunet-scheme] 17/42: cadet/client: Use <loop> for various objects where possible., gnunet, 2022/09/10
- [gnunet-scheme] 27/42: cadet/client: Simplify more., gnunet, 2022/09/10
- [gnunet-scheme] 23/42: dht/client: Re-indent., gnunet, 2022/09/10
- [gnunet-scheme] 22/42: nse/indent: Re-indent., gnunet, 2022/09/10
- [gnunet-scheme] 26/42: server: Inline single-use server->loop-arguments., gnunet, 2022/09/10
- [gnunet-scheme] 24/42: cadet/client: Re-indent., gnunet, 2022/09/10
- [gnunet-scheme] 33/42: server: Document 'make-loop'., gnunet, 2022/09/10
- [gnunet-scheme] 30/42: doc/service-communication: Document the control loop., gnunet, 2022/09/10
- [gnunet-scheme] 18/42: cadet/client: Rewrite with run-loop., gnunet, 2022/09/10
- [gnunet-scheme] 32/42: server: Add type checking to make-loop.,
gnunet <=
- [gnunet-scheme] 36/42: doc/concurrency: Add missing label for lost-and-found., gnunet, 2022/09/10
- [gnunet-scheme] 39/42: server: Add type checking., gnunet, 2022/09/10
- [gnunet-scheme] 35/42: doc/service-communication: Document #:control-message-handler., gnunet, 2022/09/10
- [gnunet-scheme] 37/42: doc/service-communication: Document run-loop., gnunet, 2022/09/10
- [gnunet-scheme] 34/42: server: Rename control -> continue., gnunet, 2022/09/10
- [gnunet-scheme] 38/42: doc/service-communication: Add procedures to the index., gnunet, 2022/09/10
- [gnunet-scheme] 40/42: doc/service-communication: Add missing argument of make-disconnect!., gnunet, 2022/09/10
- [gnunet-scheme] 41/42: NEWS: Update., gnunet, 2022/09/10
- [gnunet-scheme] 42/42: Merge branch 'server-unification', gnunet, 2022/09/10