[vlc-devel] [RFC PATCH 7/8] dsm/sd: discover in a separate thread
Thomas Guillem
thomas at gllm.fr
Fri Nov 28 13:13:31 CET 2014
On Fri, Nov 28, 2014, at 13:03, Rémi Denis-Courmont wrote:
> Le 2014-11-28 12:59, Thomas Guillem a écrit :
> > On Fri, Nov 28, 2014, at 10:52, Rémi Denis-Courmont wrote:
> >> 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.
> >
> > netbios_ns_discover is not fast. Without that commit, the UI thread
> > is
> > blocked while you discover (tested width vlc desktop).
>
> So it is slow for the sake of my previous email and your patch does not
> really solve the problem. Try to unload the SD (or exit the player)...
>
> > Should I add a vlc_cancel call ?
>
> I am not familiar with libDSM, so I don't know.
Yes, netbios_ns_discover() prevent the stop. I'll check on libDSM to
cancel it.
>
> --
> Rémi Denis-Courmont
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list