Folks, I'm stuck! I have a servlet that wants to do the following:
;;----------------------------------------------------------- (define (start req) (define request-start/s (current-seconds)) (printf "REQUEST @ ~a~%" request-start/s) ;; long I/O, fetch from a web service or some such (thread-wait (thread (λ () (sleep 10)))) (define request-end/s (current-seconds)) (begin0 (response/full 200 #"Okay" request-end/s #"text/plain" null (list (string->bytes/utf-8 (format "request/response interval ~a -> ~a" request-start/s request-end/s)))) (printf "RESPONSE @ ~a :: ~a~%" request-end/s #f))) ;;----------------------------------------------------------- No matter what I do my clients are serviced sequentially. I have tried: - using the plt-web-server - #lang web-server and racket command line - #lang web-server and drracket. REQUEST @ 1430151106 RESPONSE @ 1430151116 :: #f REQUEST @ 1430151116 RESPONSE @ 1430151126 :: #f So, a pair of requests which could be serviced in 10s + a tiny bit are taking 20s. How do I serve this servlet so that it handles requests in parallel. Thanks in advance, Tim -- Tim Brown CEng MBCS <tim.br...@cityc.co.uk> ======================================================================== City Computing Limited · www.cityc.co.uk City House · Sutton Park Rd · Sutton · Surrey · SM1 2AE · GB T:+44 20 8770 2110 · F:+44 20 8770 2130 ------------------------------------------------------------------------ City Computing Limited registered in London No:1767817. Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE VAT No: GB 918 4680 96 -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.