We do maintain a lock around vlc_object_alive() because we want to make sure we won't miss the point when a concurrent thread will call vlc_object_kill(), that is set b_die and vlc_object_signal(). If we missed b_die and the signal, next vlc_object_wait() will dead lock.
playlist_MainLoop( p_playlist );
PL_LOCK;
+ /* The playlist lock has been unlocked, so we can't tell if
+ * someone has killed us in the meantime. Check now. */
+ if( !vlc_object_alive( p_playlist ) )
+ break;
+
if( p_playlist->b_cant_sleep )
{
/* 100 ms is an acceptable delay for playlist operations */