Commit 1794ae7b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Simplification to avoid busy loops after process suspension

parent 4f8e40a8
...@@ -134,8 +134,6 @@ static void Deactivate( vlc_object_t *p_this ) ...@@ -134,8 +134,6 @@ static void Deactivate( vlc_object_t *p_this )
*****************************************************************************/ *****************************************************************************/
static void Run( intf_thread_t *p_intf ) static void Run( intf_thread_t *p_intf )
{ {
mtime_t deadline = mdate();
#ifdef HAVE_DBUS #ifdef HAVE_DBUS
p_intf->p_sys->p_connection = dbus_init( p_intf ); p_intf->p_sys->p_connection = dbus_init( p_intf );
#endif #endif
...@@ -172,12 +170,10 @@ static void Run( intf_thread_t *p_intf ) ...@@ -172,12 +170,10 @@ static void Run( intf_thread_t *p_intf )
} }
} }
vlc_mutex_lock( &p_intf->object_lock );
/* Check screensaver every 30 seconds */ /* Check screensaver every 30 seconds */
deadline += 30 * 1000000; vlc_mutex_lock( &p_intf->object_lock );
vlc_cond_timedwait( &p_intf->object_wait, &p_intf->object_lock, vlc_cond_timedwait( &p_intf->object_wait, &p_intf->object_lock,
deadline ); mdate() + 30000000 );
} }
while( !p_intf->b_die ); while( !p_intf->b_die );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment