[vlc-devel] commit: Asynchronous timer API ( R??mi Denis-Courmont )
Rémi Denis-Courmont
remi at remlab.net
Wed Jun 3 13:02:22 CEST 2009
On Wed, 3 Jun 2009 12:45:10 +0200, jpd at videolan.org wrote:
> On Tue, Jun 02, 2009 at 08:32:09PM +0200, git version control wrote:
>> +struct vlc_timer_t
>> +{
>> + timer_t handle;
>> + void (*func) (vlc_timer_t *, void *);
>> + void *data;
>> +};
>
> Why func(vlc_timer_t, data) instead of just func(vlc_timer_t) and
> expecting func to say vlc_timer_t->data?
Because this is ugly. I could live with removing the timer, but removing
the opaque data seems wrong.
> As a sidenote, some systems have hard limits on the number of timers one
> can create (and the system might fail in Interesting Ways should that
> limit be reached). I don't know what order of number of timers vlc would
> like to use, but do we have fallbacks for the less time critical timer
> users?
A timer requires fewer resources than a permanent thread, which is what we
had earlier.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list