make-jobd now takes an optarg: jobd-vers
This commit is contained in:
parent
c0ece4c94b
commit
cafba717cf
8
jobd.scm
8
jobd.scm
|
@ -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))
|
||||||
|
|
|
@ -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/)
|
||||||
|
|
Loading…
Reference in New Issue