[plt-scheme] a problem about servlet

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Dec 5 02:00:25 EST 2004

On Dec  5, Zhu Chongkai wrote:
> The servlet works and the output web page is what I need. But the
> GIF file was not deleted even after the 30 seconds waiting time (and
> thus many GIFs aaccumulate under web-root/htdocs). Why? And how to
> make it work (delete the file)?

Not a direct answer for your question (I don't remember how
send/finish works), but I think that this approach is not robust in
any case (sending stuff to the client might hang, and then the Scheme
thread will die with an exception).  A better approach would be to
generate GIFs in some directory using random names, and have a
seperate thread that periodically scans it and removes files that are
older than some threshold.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.