[tbnl-devel] Help needed in handler function with (sleep seconds)

Edi Weitz edi at agharta.de
Mon Aug 23 14:07:08 UTC 2004


On Mon, 23 Aug 2004 14:38:10 +0200, Massimiliano Campagnoli <maxi at paoloastori.com> wrote:

> I have defined this function as an handler:
>
> (defun my-handler ()
>   (sleep 2)
>   (no-cache)
>   (with-html (:html (:body (:h2 " Wait Test Perfomed") ) ) )
> )

You should get rid of the extra spaces. It's ugly and non-standard.

> and added (create-prefix-dispatcher "/tbnl/test/myhandler.html"
> my-handler) as a list
> into *dispatch-table*.

How do you mean that, "added as a list?"

> When I access /http://linuxbox/tbnl/test/myhandler/

I suppose you mean http://linuxbox/tbnl/test/myhandler.html.

> I cannot see anything but if I comment out (sleep 2) from my-handler
> everything works fine and the message Wait Test Perfomed is
> displayed on the browser.
>
> Can you please explain me what is going on ?

I cannot reproduce your results. If I add your MY-HANDLER function to
the TBNL tests then it acts as expected, i.e. I see the page after
about two seconds. Can anyone else see this problem?

Which Lisp are you using? Do you see anything relevant in the Apache
log files?

Cheers,
Edi.




More information about the Tbnl-devel mailing list