forked from videolan/vlc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win32: make thread killed flag atomic
Setting the flag in APC had the benefit of not needing atomicity, but it meant the flag only got set at the next opportunity to run APC's. Especially vlc_testcancel() is not an alertable function, so it would typically be slower. If the thread did not go to alertable sleep, then vlc_testcancel() would not work at all. Since vlc_cancel() and vlc_testcancel() do not imply any memory barriers, the loads and stores can be relaxed. That removes most if not all of the overhead of the atomic operations.
- Loading branch information
Rémi Denis-Courmont
committed
May 27, 2016
1 parent
9503a2c
commit f2f32ee
Showing
1 changed file
with
3 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters