[vlc-devel] [PATCH 2/2] audioscrobbler: use semaphore instead of cancellation
remi at remlab.net
Mon Apr 13 13:04:49 CEST 2020
Le maanantaina 13. huhtikuuta 2020, 13.29.10 EEST Alexandre Janniaux a écrit :
> It seems to add more complexity than removing it(unlike
> other similar patch you wrote)
That's true if looking at the raw line counts. It's not unexpected:
Cancellation does allow some simplifications when there are more than one
point, namely here vlc_tick_wait() and vlc_cond_wait().
Though some cancellation haters might counter that cancellation is
intrinsically more complicated because of its abnormal call flow, and/or
implementation cost (inside vlc_cond_t code).
> so adding more info in the commit message would help understand why you make
> this change on the long run.
I had no goal other than removing one case of CV cancellation.
I suppose that it also provides a use case for vlc_sem_trywait(), which would
only be for the same of API completeness.
Tapiola new town, Uusimaan Republic
More information about the vlc-devel