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

Pierre Ynard linkfanel at yahoo.fr
Wed Jul 15 18:01:49 CEST 2009


> > 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.)

-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."



More information about the vlc-devel mailing list