adjust-timeout

svn: r6616
This commit is contained in:
Jay McCarthy 2007-06-12 23:59:19 +00:00
parent bd370b3763
commit 20220e60b6
3 changed files with 23 additions and 7 deletions

View File

@ -0,0 +1,13 @@
(module adjust mzscheme
(require (lib "servlet.ss" "web-server"))
(provide (all-defined))
(define interface-version 'v1)
(define timeout +inf.0)
(define (start initial-request)
(adjust-timeout! 1)
(send/suspend
(lambda (k-url)
`(html (head (title "Hello"))
(body (a ([href ,k-url])
"Link")))))
`(html (body "Should not happen"))))

View File

@ -105,6 +105,9 @@ Web Language. (See @secref["lang"].)
up, the @scheme[exn:fail:servlet-manager:no-continuation] exception up, the @scheme[exn:fail:servlet-manager:no-continuation] exception
is thrown with @scheme[instance-exp-handler] as the expiration handler, if is thrown with @scheme[instance-exp-handler] as the expiration handler, if
no expiration-handler was passed to @scheme[continuation-store!]. no expiration-handler was passed to @scheme[continuation-store!].
@scheme[adjust-timeout!] corresponds to @scheme[reset-timer!] on the timer
responsible for the servlet instance.
} }
This manager has been found to be... problematic... in large-scale This manager has been found to be... problematic... in large-scale

View File

@ -51,6 +51,7 @@
"Servlets" "Servlets"
; XXX test update cache ; XXX test update cache
; XXX redirect/get
(test-pred "configure.ss" (test-pred "configure.ss"
string? string?
@ -112,10 +113,9 @@
(list "Expired" (list "Expired"
"Done." "Done."
"Expired")) "Expired"))
) (test-equal? "adjust.ss - adjust-timeout!"
(let* ([d (mkd (build-path example-servlets "adjust.ss"))]
; XXX redirect/get [k0 (first ((sxpath "//a/@href/text()") (call d url0 empty)))])
; XXX redirect/get/forget (sleep 3)
; XXX adjust-timeout! (call d k0 empty))
"#")))))
)))