reduced time of broadcast to every 0.5 seconds to avoid hogging cpu and
temps
This commit is contained in:
parent
66d5762bd9
commit
a540bc917f
@ -92,7 +92,7 @@
|
|||||||
;; with server
|
;; with server
|
||||||
;(semaphore-wait fair)
|
;(semaphore-wait fair)
|
||||||
;; we will retrieve the line printed below from the server
|
;; we will retrieve the line printed below from the server
|
||||||
(define evt (sync/timeout 30 (read-line-evt in)))
|
(define evt (sync/timeout 60 (read-line-evt in)))
|
||||||
(cond [(eof-object? evt)
|
(cond [(eof-object? evt)
|
||||||
(displayln "Server connection closed")
|
(displayln "Server connection closed")
|
||||||
(custodian-shutdown-all main-client-cust)
|
(custodian-shutdown-all main-client-cust)
|
||||||
|
@ -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 10) ;; wait 30 secs before beginning to broadcast
|
(sleep 0.5) ;; wait 30 secs before beginning to broadcast
|
||||||
(broadcast)
|
(broadcast)
|
||||||
(loopb)))))
|
(loopb)))))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
@ -98,7 +98,7 @@
|
|||||||
(semaphore-wait stdout)
|
(semaphore-wait stdout)
|
||||||
(display "Started a thread to kill hanging connecting thread\n")
|
(display "Started a thread to kill hanging connecting thread\n")
|
||||||
(semaphore-post stdout)
|
(semaphore-post stdout)
|
||||||
(sleep 360)
|
(sleep 1360)
|
||||||
(custodian-shutdown-all cust)))))
|
(custodian-shutdown-all cust)))))
|
||||||
|
|
||||||
; (define (handle connections)
|
; (define (handle connections)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user