More updates.
This commit is contained in:
parent
a540bc917f
commit
11f4ae1946
@ -47,7 +47,7 @@
|
|||||||
(display "Broadcast thread started!\n")
|
(display "Broadcast thread started!\n")
|
||||||
(semaphore-post stdout)
|
(semaphore-post stdout)
|
||||||
(let loopb []
|
(let loopb []
|
||||||
(sleep 0.5) ;; wait 30 secs before beginning to broadcast
|
; (sleep 0.5) ;; wait 30 secs before beginning to broadcast
|
||||||
(broadcast)
|
(broadcast)
|
||||||
(loopb)))))
|
(loopb)))))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
@ -166,7 +166,7 @@
|
|||||||
(lambda ()
|
(lambda ()
|
||||||
(semaphore-wait messages-s)
|
(semaphore-wait messages-s)
|
||||||
|
|
||||||
(if (not (null? messages))
|
(cond [(not (null? messages))
|
||||||
(begin (map
|
(begin (map
|
||||||
(lambda (ports)
|
(lambda (ports)
|
||||||
(displayln (first messages) (get-output-port ports))
|
(displayln (first messages) (get-output-port ports))
|
||||||
@ -180,10 +180,11 @@
|
|||||||
;; current state of messages and connections
|
;; current state of messages and connections
|
||||||
;messages
|
;messages
|
||||||
;connections
|
;connections
|
||||||
(displayln "Message broadcasted"))
|
(displayln "Message broadcasted"))]
|
||||||
(begin (semaphore-wait stdout)
|
)
|
||||||
(display "No message to display\n")
|
; (begin (semaphore-wait stdout)
|
||||||
(semaphore-post stdout)))
|
; (display "No message to display\n")
|
||||||
|
; (semaphore-post stdout)))
|
||||||
|
|
||||||
;;; -- NO LONGER IN USE --- TO BE DELETED
|
;;; -- NO LONGER IN USE --- TO BE DELETED
|
||||||
; Approach one was to broadcast via thread mailboxes
|
; Approach one was to broadcast via thread mailboxes
|
||||||
|
Loading…
Reference in New Issue
Block a user