]> git.sesse.net Git - vlc/commit
LUA intf: fix lock_and_wait, and stop using vlc_object_wait()
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Mon, 12 Jan 2009 17:52:01 +0000 (19:52 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Mon, 12 Jan 2009 17:52:01 +0000 (19:52 +0200)
commitb935abee4d16231e34ab6a2b092fcc1e757483c5
treebfada21f8ea75626ba2891acb923e4ea69eee54c
parent88cfc80e90ffa06ad33b4bcb670beb05201a45d4
LUA intf: fix lock_and_wait, and stop using vlc_object_wait()

The only event that lock_and_wait can only wait for the end of the
interface event (safely). That is the only piece of state which is read
under the lock.

Also it is not possible to wait on a random object since (deprecated)
vlc_object_signal() is _not_ broadcasting the object condition variable.
In effect, VLC threads shall only wait on their own object (this is not
LUA-specific).

Ultimately, lock_and_wait is of barely any use, and in any case is now
poorly named (my fault for inventing vlc_object_lock_and_wait()). By the
way, it always returns true now.
modules/misc/lua/intf.c
modules/misc/lua/libs/misc.c
modules/misc/lua/vlc.h