Commiting new interface version, with new timeout semantics
svn: r862
This commit is contained in:
parent
f28927d3b1
commit
490010bd3a
|
@ -247,8 +247,7 @@
|
|||
(make-execution-context
|
||||
conn req (lambda () (suspend #t))))
|
||||
(increment-timer (servlet-instance-timer inst)
|
||||
(timeouts-default-servlet
|
||||
(host-timeouts host-info)))
|
||||
(servlet-connection-interval-timeout the-servlet))
|
||||
(let-values ([(k k-expiration-handler k-salt)
|
||||
(apply values
|
||||
(hash-table-get
|
||||
|
@ -330,6 +329,8 @@
|
|||
[(unit/sig? s)
|
||||
(make-servlet (v0.servlet->v1.lambda s)
|
||||
(current-namespace)
|
||||
(timeouts-default-servlet
|
||||
(host-timeouts host-info))
|
||||
(make-default-servlet-instance-expiration-handler host-info))]
|
||||
; FIX - reason about exceptions from dynamic require (catch and report if not already)
|
||||
;; module servlet
|
||||
|
@ -342,13 +343,16 @@
|
|||
[start (dynamic-require module-name 'start)])
|
||||
(make-servlet (v1.module->v1.lambda timeout start)
|
||||
(current-namespace)
|
||||
(timeouts-default-servlet
|
||||
(host-timeouts host-info))
|
||||
(make-default-servlet-instance-expiration-handler host-info)))]
|
||||
[(v2) ; XXX: Undocumented
|
||||
[(v2-transitional) ; XXX: Undocumented
|
||||
(let ([timeout (dynamic-require module-name 'timeout)]
|
||||
[instance-expiration-handler (dynamic-require module-name 'instance-expiration-handler)]
|
||||
[start (dynamic-require module-name 'start)])
|
||||
(make-servlet (v1.module->v1.lambda timeout start)
|
||||
(current-namespace)
|
||||
timeout
|
||||
instance-expiration-handler))]
|
||||
[else
|
||||
(raise (format "unknown servlet version ~e" version))]))]
|
||||
|
@ -356,6 +360,8 @@
|
|||
[(response? s)
|
||||
(make-servlet (v0.response->v1.lambda s a-path)
|
||||
(current-namespace)
|
||||
(timeouts-default-servlet
|
||||
(host-timeouts host-info))
|
||||
(make-default-servlet-instance-expiration-handler host-info))]
|
||||
[else
|
||||
(raise 'load-servlet/path "Loading ~e produced ~n~e~n instead of a servlet." a-path s)])))))
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
(lambda ()
|
||||
(make-servlet the-servlet
|
||||
(i:make-servlet-namespace)
|
||||
30
|
||||
(lambda (request)
|
||||
`(html (head "Return to the interaction window.")
|
||||
(body (p "Return to the interaction window.")))))))
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
(provide (struct exn:servlet:instance ())
|
||||
(struct exn:servlet:no-current-instance ())
|
||||
(struct exn:servlet:continuation (expiration-handler))
|
||||
(struct servlet (handler namespace instance-expiration-handler))
|
||||
(struct servlet (handler namespace connection-interval-timeout instance-expiration-handler))
|
||||
(struct execution-context (connection request suspend))
|
||||
(struct servlet-instance (id k-table custodian context mutex timer))
|
||||
current-servlet-instance)
|
||||
|
@ -17,7 +17,7 @@
|
|||
;; will be in affect for the entire dynamic extent of every
|
||||
;; continuation associated with that instance.
|
||||
(define current-servlet-instance (make-thread-cell #f))
|
||||
(define-struct servlet (handler namespace instance-expiration-handler))
|
||||
(define-struct servlet (handler namespace connection-interval-timeout instance-expiration-handler))
|
||||
(define-struct servlet-instance (id k-table custodian context mutex timer))
|
||||
(define-struct execution-context (connection request suspend))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user