[vlc-devel] [RFC PATCH 7/8] dsm/sd: discover in a separate thread

Rémi Denis-Courmont remi at remlab.net
Fri Nov 28 10:52:59 CET 2014


Le 2014-11-27 14:00, Thomas Guillem a écrit :
> @@ -105,7 +116,8 @@ void bdsm_SdClose (vlc_object_t *p_this)
>      if( p_sys == NULL )
>          return;
>
> -    if( p_sys->ns != NULL )
> -        netbios_ns_destroy( p_sys->ns );
> +    vlc_join( p_sys->thread, NULL );

If netbios_ns_discover() is fast (which the current code seems to 
assume), running it in a thread seems rather pointless. If it is slow, 
the code is broken and moving it into an uninterruptible thread won't 
fix it.

> +
> +    free( p_sys );
>  }

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list