aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbrahim Mkusa <ibrahimmkusa@gmail.com>2017-04-12 00:46:08 -0400
committerIbrahim Mkusa <ibrahimmkusa@gmail.com>2017-04-12 00:46:08 -0400
commit11f4ae1946693cf5f46e8d0ed26494c490155e76 (patch)
tree7365dcbc6522ae3ad786e3bf2b8bb73f5cf039ce
parenta540bc917f34e51651960470d5d73de64c4b3ccb (diff)
More updates.
-rw-r--r--Hermes/server.rkt13
1 files changed, 7 insertions, 6 deletions
diff --git a/Hermes/server.rkt b/Hermes/server.rkt
index 4b590db..d3039d3 100644
--- a/Hermes/server.rkt
+++ b/Hermes/server.rkt
@@ -47,7 +47,7 @@
(display "Broadcast thread started!\n")
(semaphore-post stdout)
(let loopb []
- (sleep 0.5) ;; wait 30 secs before beginning to broadcast
+ ; (sleep 0.5) ;; wait 30 secs before beginning to broadcast
(broadcast)
(loopb)))))
(lambda ()
@@ -166,7 +166,7 @@
(lambda ()
(semaphore-wait messages-s)
- (if (not (null? messages))
+ (cond [(not (null? messages))
(begin (map
(lambda (ports)
(displayln (first messages) (get-output-port ports))
@@ -180,10 +180,11 @@
;; current state of messages and connections
;messages
;connections
- (displayln "Message broadcasted"))
- (begin (semaphore-wait stdout)
- (display "No message to display\n")
- (semaphore-post stdout)))
+ (displayln "Message broadcasted"))]
+ )
+ ; (begin (semaphore-wait stdout)
+ ; (display "No message to display\n")
+ ; (semaphore-post stdout)))
;;; -- NO LONGER IN USE --- TO BE DELETED
; Approach one was to broadcast via thread mailboxes