Index: example/q/threaded-queue.scm ================================================================== --- example/q/threaded-queue.scm +++ example/q/threaded-queue.scm @@ -257,11 +257,16 @@ (define (tjq:new #!key (qname (gensym)) (sync-job-cap 100)) (let* ((job-hash (make-hash-table)) (obj-mbox (make-mailbox))) (letrec - ((dispatch-thread (tjq:dispatcher-thread qname job-hash sync-job-cap obj)) + ((dispatch-thread + (tjq:dispatcher-thread + job-thread-timeout-seconds: 0.01 + timeout-seconds: 0.01 + + qname job-hash sync-job-cap obj)) (obj (lambda (op . args) (cond ((eq? op 'event-loop) (print "got event-loop") @@ -326,18 +331,18 @@ (q 'drain) ;;(q 'event-loop) )) (define (test-submit-bunch2) - (let* ((q (tjq:new qname: 'test-q sync-job-cap: 42))) + (let* ((q (tjq:new qname: 'test-q sync-job-cap: 20 ))) (for-each (lambda (x) ;;(let* ((cmd (conc "echo did job "x))) (let* ((cmd "/bin/true")) ;;(print "submit it--"x) (q 'submit cmdline: cmd)) ) - (iota 600)) + (iota 6000)) ;;(thread-sleep! 10) (q 'drain) ;;(q 'event-loop) ))