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

vlc_testcancel: explicit cancellation point

parent de359690
...@@ -615,6 +615,18 @@ static inline void vlc_restorecancel (int state) ...@@ -615,6 +615,18 @@ static inline void vlc_restorecancel (int state)
#endif #endif
} }
/**
* Issues an explicit deferred cancellation point.
* This has no effect if thread cancellation is disabled.
* This can be called when there is a rather slow non-sleeping operation.
*/
static inline void vlc_testcancel (void)
{
#if defined (LIBVLC_USE_PTHREAD)
pthread_testcancel ();
#endif
}
/***************************************************************************** /*****************************************************************************
* vlc_thread_create: create a thread * vlc_thread_create: create a thread
*****************************************************************************/ *****************************************************************************/
......
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