|
Boost : |
From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-12-31 02:16:21
Hi Jeff,
--- Jeff Garland <jeff_at_[hidden]> wrote:
<snip>
> So the questions are:
>
> 1) Is the intent to support an 'unlimited' number of timers
> portably?
Yes.
> 2) If yes, does the implementation do this for all platforms?
Yes.
First a minor clarification to put things in asio terminology:
the question is not just about whether you can have an unlimited
number of deadline_timer objects, but also whether you can have
an unlimited number of pending asynchronous waits.
The implementation of a deadline_timer object is just an expiry
time (stored as a boost::posix_time::ptime).
Each pending asynchronous wait on a timer is represented by an
entry in a heap, sorted by expiry. Only the earliest expiry is
fed into the demultiplexer as a timeout, so in that sense there
is only one OS timer being used.
Cheers,
Chris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk