[vlc-devel] [vlc-commits] lua: remove broken code

Rémi Denis-Courmont remi at remlab.net
Tue Mar 22 08:51:12 CET 2011

On Tue, 22 Mar 2011 01:35:02 +0100, Pierre Ynard <linkfanel at yahoo.fr>
> Then it gets cancelled whereever it does, but most of time it'll be
> when the interface is idle, in poll().

If that's from within the LUA parser, it's most certainly wrong. My point
being that we should not offer plain 'poll()' in LUA at all, as there is no
way to get it right. I have been thinking of a wrapper around poll() that
would automatically be woken up on vlc_object_kill() but I could not come
think of a simple enough and race-free implementation so far.

> The point is that if the thread is cancelled,
> then it's not possible to run any clean-up code in the lua script,
> so calling the destructor would be quite convoluted.

> It's probably better to just handle the sockets in C.

I agree. I think I already mentioned that we should separate:
- the I/O with separate C code paths for network and console, and
- the parser(s) for VLM and "RC".

Rémi Denis-Courmont

More information about the vlc-devel mailing list