tidied up, removed some unused definitions

This commit is contained in:
Ibrahim Mkusa 2017-04-13 14:09:40 -04:00
parent a0fbba4a81
commit 2c8407d195
2 changed files with 2 additions and 7 deletions

View File

@ -1,8 +1,6 @@
#lang racket
(require math/base) ;; for random number generation
;; TODO wrap "safer send in a function that takes care of semaphores"
;; globals
; track number of connections with closure
(define (make-count no-count)
@ -20,6 +18,7 @@
[(eq? m 'current-count) current-count]))
dispatch)
(define c-count (make-count 0))
; a semaphore to control access to c-count
(define c-count-s (make-semaphore 1))
@ -38,7 +37,7 @@
[(eq? m 'add) add]))
dispatch)
(define c-connections (make-connections '()))
; a semaphore to control acess to c-connections
(define connections-s (make-semaphore 1)) ;; control access to connections
;; every 5 seconds run to broadcast top message in list
@ -46,10 +45,6 @@
(define messages-s (make-semaphore 1)) ;; control access to messages
(define messages '()) ;; stores a list of messages(strings) from currents
(define threads-s (make-semaphore 1)) ;; control access to threads
;; lets keep thread descriptor values
(define threads '()) ;; stores a list of client serving threads as thread descriptor values
;; Several threads may want to print to stdout, so lets make things civil
(define stdout (make-semaphore 1))