Create an ns_event, then spin the query off into one thread which will
signal the event when it's done, and spin off a second thread that does a
sleep and then signals the event.  In your main request thread, you wait for
the event and see which thread signaled it (an nsv, I guess), and then you
can either redirect to the results page (if the query finished first), or
display a link to the results page with a plea for patience (if the timer
finished first).  I don't know if you'd call it "easy"...

On 3/18/02 6:08 PM, "Ian Harding" <[EMAIL PROTECTED]> wrote:

> Thanks for fast responses.  I found  the old thread and read it.
>
> I guess I don't want to get that fancy.  I only have a couple operations that
> are likely to take so long that they timeout the browser.  I would like to be
> able to start the query, count to 100, and if the query hasn't returned yet,
> send the client a message saying "Dang, that's taking a long time, why don't
> you check back later and see if it's done!" message.  I can't see an easy way
> to do that.  Is there one?
>
>
> Ian A. Harding
> Programmer/Analyst II
> Tacoma-Pierce County Health Department
> (253) 798-3549
> mailto: [EMAIL PROTECTED]
>
>>>> [EMAIL PROTECTED] 03/18/02 02:39PM >>>
> I think the previous thread dealt with detecting client shutdown, so that
> long-running queries could be stopped in the hope of reclaiming resources,
> and the conclusion was that the way AOLserver had implemented reads from the
> client, that it was impossible to determine whether the client bailed.
>
> If you're looking to provide feedback, you can do crude stuff if you write
> your response using ns_write instead of one of the ns_return brothers.
> Otherwise, you're looking at a Java applet, ActiveX control, or perhaps a
> Flash thingy that would converse with the server to determine progress and
> report it, if you want the client to maintain a connection.  The remaining
> solution is to accept the request and give the client a means of
> ascertaining status later, such as a bookmarkable status screen or email.
>

Reply via email to