I need to make an action when current custiodian shutdowns.

Now I have something like

(define (with-status main-custodian)
   (define a-box (make-custodian-box (current-custodian) #t))
   (parameterize ([current-custodian main-custodian])
       (thread (λ ()
                  (sync a-box)
                  (do-logoff))))

And in main program

(thread (lambda ()
          (define main-custodian (current-custodian))
          (parameterize ([current-custodian (make-custodian])
            ....
            (with-status main-custodian)
            ...)))

Is it the only way or can I somehow make a thread outside of the current 
custodian?

-- 
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.

Reply via email to