[vlc-devel] [RFC 0/2] New executor API

Rémi Denis-Courmont remi at remlab.net
Thu Aug 27 21:28:58 CEST 2020


Le torstaina 27. elokuuta 2020, 22.13.37 EEST Romain Vimont a écrit :
> > So the runnable will be using poll(), vlc_cond_t, vlc_sem_t or some other
> > wait method that supports timing-out. It might as well use that time-out
> > capability instead of relying on a thread for the sole purpose of maybe
> > (ab)using the interrupt callback on time-out.
> 
> Yes, if you only want timeout, but not "unexpected" cancelation, that
> works (and is better).
> 
> > Besides, timing out is an error that deserves logging. Interrupt is not.
> > So using the same callback for both purpose looks dubious to me.
> 
> The goal is simplicity.

By making things more complicated. Yeah right...

> Timeout and cancelation share the same purpose:
> stop the current job when possible. A timeout is just a cancelation
> where the deadline is known in advance.
> 
> I think it is a good thing that users don't have to implement timeout
> and cancelation in two totally different ways.

And I think it's very bad because generally you should handle those 
differently. One is an error, and the other is not.

-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list