apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wray Ferrell <wferr...@cisco.com>
Subject APR - Setting Generic Timers
Date Tue, 20 Jan 2004 16:23:02 GMT
Having spent a few days looking at what APR has
to offer, I noticed that there does not appear to
be anyway to set a generic timer. The functions
apr_thread_cond_timedwait put the thread to sleep
while waiting for either the condition to be fullfilled
or the timeout to occur. What I am looking for, and
feel sure I overlooked, is the ability for a thread to
set a timer with an expiration and a callback function.

For example, use a VOIP phone using the SIP protocol.
The phone sends out an INVITE and then sets a timer
with a callback function. If that timer pops the phone
knows that no response to the initial INVITE has been
recieved so the phone will re-transmit the INVITE.
However this thread cannot sleep because it must still
process data from the DSP, the user could decide to
hangup, etc...

How would this be modeled in APR or is APR a
purely event-driven model?

Thanks, Wray

View raw message