From: Laurent Aimar Date: Mon, 22 Dec 2008 18:26:47 +0000 (+0100) Subject: Ensure fast fetcher/preparser thread cancelation. X-Git-Tag: 1.0.0-pre1~1515 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c12edba9d8189b0714197b6e50a38e3d8b6d9351;p=vlc Ensure fast fetcher/preparser thread cancelation. --- diff --git a/src/playlist/fetcher.c b/src/playlist/fetcher.c index 690385f530..88a289c695 100644 --- a/src/playlist/fetcher.c +++ b/src/playlist/fetcher.c @@ -366,6 +366,9 @@ static void *Thread( void *p_data ) { input_item_t *p_item; + /* Be sure to be cancellable before our queue is empty */ + vlc_testcancel(); + /* */ vlc_mutex_lock( &p_fetcher->lock ); mutex_cleanup_push( &p_fetcher->lock ); diff --git a/src/playlist/preparser.c b/src/playlist/preparser.c index cca30229f2..c8c52cadf1 100644 --- a/src/playlist/preparser.c +++ b/src/playlist/preparser.c @@ -187,6 +187,9 @@ static void *Thread( void *data ) { input_item_t *p_current; + /* Be sure to be cancellable before our queue is empty */ + vlc_testcancel(); + /* */ vlc_mutex_lock( &p_preparser->lock ); mutex_cleanup_push( &p_preparser->lock );