On 5/28/05, Michael Graham <suppressed> wrote:
> I've made a new version which filters out duplicate callbacks:
Somewhere along the line did we loose the ability to register a
callback to the object? In the latest patch, it looks like a call to
$self->add_callback(...) will end up registering the callback in
ref($self) (or in otherwords, the class, not the object).
This means you will not be able to register a one time callback in a
persistent environment.
Here is an example where that might be useful. Say you have a long
running task that needs to be accomplished and you do not want the
user to wait for a response. To solve this problem, in your runmode
you register a callback at the teardown stage, and you do the work in
that callback. The teardown stage runs after the HTML has been sent
to the browser, so your callback can take as long as it wants without
making the user wait (you could accomplish the same thing using a fork
of course). If running under mod_perl, the next request will also run
the teardown callback that was registered during the previous request.
I think this type of one time callback should be supported.
Cheers,
Cees
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.