[vlc-devel] [RFC 0/2] New executor API
rom1v at videolabs.io
Thu Aug 27 17:57:09 CEST 2020
On Thu, Aug 27, 2020 at 05:50:29PM +0200, Romain Vimont wrote:
> On Thu, Aug 27, 2020 at 05:47:49PM +0300, Rémi Denis-Courmont wrote:
> > Le torstaina 27. elokuuta 2020, 17.32.10 EEST Romain Vimont a écrit :
> > > Yes, but vlc_executor_Cancel() may "interrupt" the task at any time, so
> > > you have to handle it anyway (timeout or not).
> > That's never going to work, unless the runnable has its own killable process
> > (which should be had for other reasons, notably I/O scheduling).
> I don't understand why you say it can't work.
> Canceling a runnable does work. This is already what
> background_worker_Cancel() provides, and with the vlc_executor_t it
> calls the interrupt() callback:
> Here is the current implementation for the preparser:
> This allows to "interrupt" the preparsing in the run():
(re-reading the current code, I realize the implementation is not
correct, but this is work-in-progress)
> That way, the same mechanism is used for both cancelation and timeout
> (there is nothing more to do for the user of executor).
> Being able to cancel tasks is a major feature of the executor.
> Cancelation is currently used by all users of background worker
> (preparser, fetcher, thumbnailer).
> IMO, that would not make sense to remove this feature from the executor
> and reimplement it several times separately.
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel