From 30e66edc612990779a870574ff588025cbee6c0a Mon Sep 17 00:00:00 2001
From: interp There may be several reasons, why your request was denied:
+
-You can try starting at the beginning."
+ (format #f
+ "
+
+
+
In any case, you may try to restart the servlet from the beginning
" (resume-url-servlet-name path-string))))) (lookup-continuation-table (lambda (instance continuation-table continuation-id) @@ -184,20 +192,20 @@ You can try starting at the beginning." (define (send/suspend response-maker) (shift return (let* ((instance-id (session-instance-id)) - (instance (instance-lookup instance-id)) - (continuations-table (instance-continuation-table instance)) - (continuation-table-lock (instance-continuation-table-lock instance)) - (continuation-counter (instance-next-continuation-counter instance))) - (obtain-lock continuation-table-lock) - (let ((continuation-id (generate-new-table-id continuations-table))) - (table-set! continuations-table continuation-id return) - (release-lock continuation-table-lock) - (let ((new-url (make-resume-url (instance-servlet-name instance) - instance-id - continuation-counter - continuation-id))) - (response-maker new-url)))))) - + (instance (instance-lookup instance-id))) + (instance-adjust-timeout! instance-id) + (let ((continuations-table (instance-continuation-table instance)) + (continuation-table-lock (instance-continuation-table-lock instance)) + (continuation-counter (instance-next-continuation-counter instance))) + (obtain-lock continuation-table-lock) + (let ((continuation-id (generate-new-table-id continuations-table))) + (table-set! continuations-table continuation-id return) + (release-lock continuation-table-lock) + (let ((new-url (make-resume-url (instance-servlet-name instance) + instance-id + continuation-counter + continuation-id))) + (response-maker new-url))))))) (define (send/finish response) (instance-delete! (session-instance-id)) @@ -239,8 +247,7 @@ You can try starting at the beginning." (+ (time) (options:instance-lifetime *options*))) (set-memo:new-memo memo new-memo) - ;; FIXME: We change instance entry's value. Do we need locking - ;; here? + ;; I don't think we need locking here. Do you agree? (set-instance-memo! instance new-memo) (set-memo:message memo 'adjust-timeout)) (release-lock *instance-table-lock*)) @@ -252,6 +259,7 @@ You can try starting at the beginning." (decline)) (lambda () (obtain-lock *instance-table-lock*) + ;; notify instance killing (table-walk (lambda (instance-id instance) (memo-killed! (instance-memo instance))) @@ -322,6 +330,22 @@ You can try starting at the beginning." (load-plugin #t)))) (load-plugin #f)))) +(define (get-loaded-plugins) + (obtain-lock *plugin-table-lock*) + (let ((loaded-plugins '())) + (table-walk + (lambda (plugin-path rt-structure) + (set! loaded-plugins (cons plugin-path loaded-plugins))) + *plugin-table*) + (release-lock *plugin-table-lock*) + loaded-plugins)) + +(define (unload-plugin plugin-name) + (obtain-lock *plugin-table-lock*) + (if (table-ref *plugin-table* plugin-name) + (table-set! *plugin-table* plugin-name #f)) + (release-lock *plugin-table-lock*)) + (define (reset-plugin-cache!) (with-fatal-error-handler* (lambda (condition decline) @@ -393,7 +417,10 @@ You can try starting at the beginning." ;; access to options (define (set-instance-lifetime! new-lifetime) - (set-options:instance-lifetime new-lifetime)) + (set-options:instance-lifetime *options* new-lifetime)) + +(define (get-instance-lifetime) + (options:instance-lifetime *options*)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; thread-safe counter