make-jobd now takes an optarg: jobd-vers

This commit is contained in:
jottbee 2005-03-12 08:22:51 +00:00
parent c0ece4c94b
commit cafba717cf
2 changed files with 11 additions and 8 deletions

View File

@ -78,14 +78,16 @@
(define jobd-vers "jobd-0.0.1") (define jobd-vers "jobd-0.0.1")
(define (make-jobd) (define (make-jobd . maybe-args)
(let-optionals maybe-args ((jobd-vers "jobd-0.0.1"))
(let* ((version jobd-vers) (let* ((version jobd-vers)
(job-ch (cml-async-ch/make-async-channel)) (job-ch (cml-async-ch/make-async-channel))
(sig-m-ch (cml-mcast-ch/make-mcast-channel)) (sig-m-ch (cml-mcast-ch/make-mcast-channel))
(start-jobber (lambda (id) (start-jobber (lambda (id)
(jobber id job-ch (cml-mcast-ch/mcast-port sig-m-ch))))) (let ((new-mport (cml-mcast-ch/mcast-port sig-m-ch)))
(jobber id job-ch new-mport)))))
(for-each start-jobber (enumerate jobbers)) (for-each start-jobber (enumerate jobbers))
(really-make-jobd version job-ch sig-m-ch))) (really-make-jobd version job-ch sig-m-ch))))
(define (version jobd) (define (version jobd)
(jobd-version-s jobd)) (jobd-version-s jobd))

View File

@ -10,6 +10,7 @@
(define-structure jobd jobd-interface (define-structure jobd jobd-interface
(open scheme-with-scsh (open scheme-with-scsh
let-opt
formats formats
srfi-1 srfi-1
(with-prefix srfi-8 srfi-8/) (with-prefix srfi-8 srfi-8/)