Boost logo

Boost :

Subject: Re: [boost] boost.timer library submission...
From: Dmitry Goncharov (dgoncharov_at_[hidden])
Date: 2009-06-02 03:37:53

JohnQ wrote:
> While using Boost for a recent project, I needed a timer class that would
> allow me to set a time in the future at which some data would be handed back
> to me via callback. It had to be thread-safe, boost friendly, and allow for
> deletion of timers after they were set but before they expired.
> I took a look at the Timer library that Beman had submitted but that didn't
> appear to satisfy my needs, so I wrote one. I think this type of library is
> a fairly common request... while looking for one I saw a number of people
> also looking for the same thing... so I'm hoping this fills a gap. In
> addition, I'm hoping that peer review will help increase the robustness of
> this library to the benefit of all.
> Where do I begin for submitting it?
> Thanks,
> John Q.

Do you hold a mutex locked while invoking a callback?
What mechanism do you use to suspend till it's time to fire a callback?
What is the precision of your library? I mean if you instruct the
library to invoke your callback in so many ms usually your callback will
be invoked at bit later. The question is how long later? Or earlier?
Does the precision degrade when you register lots of callbacks?
What's the smallest possible timeout the library lets to register a
callback with? How does the library handle small (e.g. 1 ms) timeout
What platforms does the library work on?

BR, Dmitry

Boost list run by bdawes at, gregod at, cpdaniel at, john at