[vlc-devel] [RFC] httpd: allow callback to be polled until they complete

Rémi Denis-Courmont remi at remlab.net
Wed Jul 15 18:04:39 CEST 2009


Le mercredi 15 juillet 2009 19:01:49 Pierre Ynard, vous avez écrit :
> > > When in waiting state, the callback will be called, again and again
> > > (like all other clients in waiting state). Until it outputs something.
> > > So it will get its chance.
> >
> > But relying on another client to trigger a loop iteration is incorrect.
> > And busy or poll loops are non-starters.
>
> Okay. That's how the code currently handles waiting states though:
>
>         /* we will wait 20ms (not too big) if HTTPD_CLIENT_WAITING */
>         switch( poll( ufd, nfd, b_low_delay ? 20 : -1) )
>
> I tested my patch and it works. (Yes, the callback is called a lot of
> times for nothing.)

I have not wasted weeks worth of my time fixing the outstanding poll loops and 
improving the thread and network subsystems to see it deliberately worsened by 
developpers who cannot be bothered to code properly.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list