DirectFB - Home of the pragmatist Roadmap


[directfb-dev] Re: WaitForEvent with timers?
Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[directfb-dev] Re: WaitForEvent with timers?



Quoting Till Adam (till@adam-lilienthal.de):
> Hello there,
> 
> in an effort to familiarize myself with the DirectFB API, I'm currently
> porting Tom Gilbert's Imlib2 based image/webcam viewer feh to DFB. It
> has among other features a slideshow mode, which changes the image after
> a configurable amount of time. These timers are implemented using
> select() as to avoid busy waiting. They are interrupted by keyboard
> events for example when the user wants to terminate the program during
> such a timer period.
> 
> I'd like to propose the addition of timeout values as an additional
> parameter to WaitForEvent, which would of course require using select
> in the _device_EventThread() handlers. An alternative would be to add
> WaitForEventWithTimeout() or something similar to the API.
> 
> What do you think?

This is exactly the next step I would have done for these functions.
I just switched to using pthread conditions that support idle waiting
with timeout.

-- 
Denis Oliver Kropp
( convergence           )
( integrated media gmbh )


-- 
Info:  To unsubscribe send a mail to listar@directfb.org with 
"unsubscribe directfb-dev" as subject.



Home | Main Index | Thread Index


directfb.org / Development / Old Archives