- From: <Jim_Ravan@avid.com>
- Date: Wed, 23 Jun 1999 09:36:15 -0400
- To: www-lib@w3.org
>To be honest, I am not entirely certain why the HTEndLoop variable is not >set to zero before entering the loop and the "while(!HTEndLoop) { ... }" >is not changed to a "do { ... } while (!HTEndLoop);". Am I missing the >point here? Yes, this is an important point. In some situations code may, for example, look like: foo = HT<something>(<some arguments>); if (foo) HTEventList_loop(request); /* wait for the request to complete*/ Now, assume that the call to HT<something> essentially fails such that the request should not continue, but a non-null foo is still returned. The chunk functions exhibit this property. If there is an end-of-request callback, it will already have been called during HT<something> processing, and the callback may have called HTEventList_stopLoop() and set HTEndLoop to 1, but HTEventList_loop has not yet been entered. Thus if HTEndLoop is set to 0 by HTEventList_loop, it would not recognize that the loop should not even be entered. I had this exact problem in my libwww code. regards, -jim
Received on Wednesday, 23 June 1999 09:45:19 UTC