On Thu, 25 Jan 2001, Louis-David Mitterrand wrote:
> Hello,
>
> Were are trying to run long a task (DB import) from a HTML::Mason page
> and are trying to send an immediate response to the user while the task
> is running. Here is our pseudo-code:
>
> <%init>
> sub long_running_task {
> # lottsa long, boring stuff
> }
> $r->puch_handlers(PerlCleanupHandler=>\&long_running_task($myarg));
> </%init>
>
> The rest of the page sends back HTML. The problem is that it _not_ sent
> back until the long_running_task function has completed.
>
> I thought that when registering a code ref in that way the sub{} would
> not be called until later during the PerlCleanupHandler phase.
>
> Am I missing something, is there a better way to do it?
Send out Content-Length so your browser knows the content is finished.
Also you might want to check out
http://take23.org/docs/guide/performance.xml/4#4.3
--
<Matt/>
/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\\
// \\