perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Chamas <>
Subject Re: Long process with ASP
Date Thu, 07 Aug 2003 19:20:59 GMT
Lisenberg Julian wrote:
> But, after coding a really long process, I discovered something. When I 
> close the client page that is processing the ASP, the process keep 
> processing à it does not finish as I supposed. I have opened the DB 
> after closing the client’s page, and the information keeps growing. Why 
> is this happening? Is it good or is it bad? Do you know any way to stop 
> a process like this? Does this kind of process have something to do with 
> multi-threads?

This behavior is good generally in that you want your web page transaction
to occur once started regardless of whether the user closes their browser
early.  Imagine writing things to a database, and having only part of those
writes go through.

If you have a long running script, and you want to stop it early if the
user closes their web browser, then check $Response->IsClientConnected
method call, and if it returns false, then call $Response->End.

 > Finally, I was able to handle this process with application variables,
 > so I could start this process, close the client page, and open it again
 > and saw were it was. Is this safe?

I am not sure what you mean with "application variables", but if you
meaning storing things in $Application, then yes it is safe to read/write
to $Application variables concurrently, same is true with $Session
data across multiple concurrent requests ... the underlying MLDBM::Sync
storage manager handles this for you without database corruption.



Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.      
NodeWorks Link Checking      

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message