@@ -185,17 +185,27 @@ (set! *api:last-stats-print* (current-seconds)))) (mutex-unlock! *api-print-db-stats-mutex*) (thread-sleep! 5) (loop))) +(define (api:tcp-dispatch-request-make-handler-new dbstruct) ;; cmd run-id params) + + ;; put proc into in-queue + ;; poll out-queue for result evey 25ms + ;; time out with big message + + #f + ) + +(define api:tcp-dispatch-request-make-handler api:tcp-dispatch-request-make-handler-old) ;; indat is (cmd run-id params meta) ;; ;; WARNING: Do not print anything in the lambda of this function as it ;; reads/writes to current in/out port ;; -(define (api:tcp-dispatch-request-make-handler dbstruct) ;; cmd run-id params) +(define (api:tcp-dispatch-request-make-handler-old dbstruct) ;; cmd run-id params) (assert *toppath* "FATAL: api:tcp-dispatch-request-make-handler called but *toppath* not set.") (if (not *server-signature*) (set! *server-signature* (tt:mk-signature *toppath*))) (lambda (indat) (api:register-thread (current-thread)) @@ -242,11 +252,11 @@ (result (case status ((busy) (if (eq? cmd 'ping) (normal-proc cmd run-id params) ;; numthreads must be greater than 5 for busy - (* 0.1 (- numthreads maxthreads)) ;; was 15 + (* 0.1 (- numthreads maxthreads)) ;; was 15 - return a number for the remote to delay )) ;; (- numthreads 29)) ;; call back in as many seconds ((loaded) ;; (if (eq? (rmt:transport-mode) 'tcp) ;; (thread-sleep! 0.5)) (normal-proc cmd run-id params))