diff options
author | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2017-04-12 00:31:41 -0400 |
---|---|---|
committer | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2017-04-12 00:31:41 -0400 |
commit | a540bc917f34e51651960470d5d73de64c4b3ccb (patch) | |
tree | 7c307ee6b6875c721dd1092dfbe80047201b1649 | |
parent | 66d5762bd992d786f933825acdba71713fe80fcc (diff) |
reduced time of broadcast to every 0.5 seconds to avoid hogging cpu and
temps
-rw-r--r-- | Hermes/client.rkt | 2 | ||||
-rw-r--r-- | Hermes/server.rkt | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Hermes/client.rkt b/Hermes/client.rkt index 574f88a..8aa19e1 100644 --- a/Hermes/client.rkt +++ b/Hermes/client.rkt @@ -92,7 +92,7 @@ ;; with server ;(semaphore-wait fair) ;; 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) (displayln "Server connection closed") (custodian-shutdown-all main-client-cust) diff --git a/Hermes/server.rkt b/Hermes/server.rkt index de11d0e..4b590db 100644 --- a/Hermes/server.rkt +++ b/Hermes/server.rkt @@ -47,7 +47,7 @@ (display "Broadcast thread started!\n") (semaphore-post stdout) (let loopb [] - (sleep 10) ;; wait 30 secs before beginning to broadcast + (sleep 0.5) ;; wait 30 secs before beginning to broadcast (broadcast) (loopb))))) (lambda () @@ -98,7 +98,7 @@ (semaphore-wait stdout) (display "Started a thread to kill hanging connecting thread\n") (semaphore-post stdout) - (sleep 360) + (sleep 1360) (custodian-shutdown-all cust))))) ; (define (handle connections) |