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

Romain Vimont rom1v at videolabs.io
Thu Aug 27 19:28:13 CEST 2020


On Thu, Aug 27, 2020 at 07:49:25PM +0300, Rémi Denis-Courmont wrote:
> Le torstaina 27. elokuuta 2020, 19.14.37 EEST Pierre Ynard via vlc-devel a 
> écrit :
> > This doesn't necessarily make as much sense depending on whether you
> > envision that the limiting factor demanding interruption will be
> > processing power / the amount of work to do, or waiting on resources to
> > become available.
> 
> If you look at the use cases, it's mostly I/O. There are no sane ways to 
> interrupt I/O.

If you explicitly poll() in the run() callback, you can add a pollfd
that you "wake up" on interrupt(). (Yes, it only works if it's not
hidden in some library call, but sometimes it's possible to interrupt
I/O.)

And among the use cases, there are preparser and thumbnailer, which can
be interrupted (and they can currently be canceled, using the background
worker).

> With network I/O, poll() cannot easily be interrupted by an in-process event.
> 
> With local disk I/O, it's even worse. poll() returns immediately regardless of 
> data being available or not. The only way to pace is to run in a separate 
> process and lower the I/O priority of that process.
> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list