Skip to content
Snippets Groups Projects
Commit 21cb9519 authored by Thomas Guillem's avatar Thomas Guillem Committed by Steve Lhomme
Browse files

executor: broadcast while locked

It's legal to do it after the lock but we always do it while locked, as
most (if not all) implementations handle this specific case.
parent a4c24514
No related branches found
No related tags found
1 merge request!4883executor: broadcast while locked
Pipeline #435037 passed with stage
in 12 minutes and 21 seconds
......@@ -266,11 +266,11 @@ vlc_executor_Delete(vlc_executor_t *executor)
/* All the tasks must be canceled on delete */
assert(vlc_list_is_empty(&executor->queue));
vlc_mutex_unlock(&executor->lock);
/* "closing" is now true, this will wake up threads */
vlc_cond_broadcast(&executor->queue_wait);
vlc_mutex_unlock(&executor->lock);
/* The threads list may not be written at this point, so it is safe to read
* it without mutex locked (the mutex must be released to join the
* threads). */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment