[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Thu, 22 Jun 2023 15:56:49 -0400 (EDT) |
branch: master
commit bb7579acc0a1c6dc1c8f5b994593e5b19b3f8e83
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jun 18 14:51:57 2023 +0200
remote: Remove 'zmq-socket-ready?'.
* src/cuirass/remote.scm (zmq-socket-ready?): Remove.
* src/cuirass/scripts/remote-server.scm (zmq-start-proxy): Use 'memq'
instead.
[socket-ready?]: Remove.
---
src/cuirass/remote.scm | 8 --------
src/cuirass/scripts/remote-server.scm | 7 +------
2 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/src/cuirass/remote.scm b/src/cuirass/remote.scm
index 3513a81..bcd6d54 100644
--- a/src/cuirass/remote.scm
+++ b/src/cuirass/remote.scm
@@ -71,7 +71,6 @@
zmq-poll*
zmq-message-receive*
- zmq-socket-ready?
zmq-empty-delimiter
zmq-build-request-message
@@ -389,13 +388,6 @@ retries a call to PROC."
(define zmq-message-receive*
(EINTR-safe zmq-message-receive))
-(define (zmq-socket-ready? items socket)
- "Return #t if the given SOCKET is part of ITEMS, a list returned by a
-'zmq-poll' call, return #f otherwise."
- (find (lambda (item)
- (eq? (poll-item-socket item) socket))
- items))
-
(define (zmq-remote-address message)
(zmq-message-gets message "Peer-Address"))
diff --git a/src/cuirass/scripts/remote-server.scm
b/src/cuirass/scripts/remote-server.scm
index c168318..590beca 100644
--- a/src/cuirass/scripts/remote-server.scm
+++ b/src/cuirass/scripts/remote-server.scm
@@ -453,11 +453,6 @@ all network interfaces."
(define (zmq-start-proxy backend-port)
"This procedure starts a proxy between client connections from the IPC
frontend to the workers connected through the TCP backend."
- (define (socket-ready? items socket)
- (find (lambda (item)
- (eq? (poll-item-socket item) socket))
- items))
-
;; The poll loop below must not be blocked. Print a warning message if a
;; loop iteration takes more than %LOOP-TIMEOUT seconds to complete.
(define %loop-timeout 5)
@@ -481,7 +476,7 @@ frontend to the workers connected through the TCP backend."
(let loop ()
(let* ((items (zmq-poll* poll-items 1000))
(start-time (current-time)))
- (when (zmq-socket-ready? items build-socket)
+ (when (memq build-socket items)
(match (zmq-message-receive* build-socket)
((worker empty rest)
(let* ((fetch-msg (zmq-msg-init