W3C home > Mailing lists > Public > www-lib@w3.org > October to December 1999

Re: Patch to stop some event loop madness

From: Sam Couter <eddie@topic.com.au>
Date: Thu, 16 Dec 1999 11:32:32 +1100
To: linda_fu@peoplesoft.com
Cc: www-lib@w3.org
Message-ID: <19991216113232.D1445@mailhost.topic.com.au>
I could be doing something else wrong, but here's a short description of the
sequence of events as I see them in a debugger:

In HTEventLoop_loop(), if HTTimer_next() deletes the last remaining request
and calls HTEventLoop_stopLoop(), HTEventLoop_loop() will still call select()
with three empty socket sets (the condition for the while loop won't be
checked until the next loop iteration). select() doesn't return, and the
application stalls.

This patch fixed the behaviour I've seen, but it may have been caused by
something else I've done. If there's some other solution to the problem, I'd
like to see it.
-- 
Sam Couter                                             sam@topic.com.au
Internet Engineer
tSA Consulting

linda_fu@peoplesoft.com <linda_fu@peoplesoft.com> wrote:
> 
> Hi, Sam,
>      I am confused here. If HTTimer_next could actually cause
> HTEventLoop_stopLoop() to be
> called, HTEndLoop turns to 1.  In that case, the loop will stop since
> "while" loop condition is broken.
> So why do you need to break it at that point?
>      The other question is: what causes the infinite loop? In what kind of
> scenario? I find libwww
> doesn't work on HP and also stuck in this infinite "while" loop because
> select( ) always return 0, while
> active_sockets == 0, the loop continues.  So I don't understand how these
> two lines
> resolve the problem.
> 
> 
> 
> Regards,
> Linda
Received on Thursday, 16 December 1999 00:17:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:35 GMT