[vlc-devel] commit: Asynchronous timer API ( Rémi Denis-Courmont )
remi at remlab.net
Wed Jun 3 12:34:00 CEST 2009
On Wed, 3 Jun 2009 12:12:26 +0200, Derk-Jan Hartman <hartman at videolan.org>
> W00t Apple :(
> Incredible annoying. Anyways, what are our options ? Are there any
> mach timer's or something that have roughly the same behaviour ? I
> suspect setitimer() is not a good alternative ?
Reserving a signal for libvlc is troublesome. But in any case, the timer
handler needs to be able to use at least mutexes, and those are not safe
from without signal handlers. Namely the signal handler can be called from
a thread that is locking the same mutex, and caboom.
I think the sanest option is to emulate it using pthread_create() and
nanosleep(). That should be fairly straightforward.
More information about the vlc-devel