boost.timer library submission...

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.

JohnQ wrote: On Monday, June 01, 2009 3:07 PM
While using Boost for a recent project, I needed a timer class [snip] so I wrote one.
[snip]
Where do I begin for submitting it?
http://www.boost.org/development/submissions.html _____ Rob Stewart robert.stewart@sig.com Software Engineer, Core Software using std::disclaimer; Susquehanna International Group, LLP http://www.sig.com IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Hi, ----- Original Message ----- From: "JohnQ" <jqs@jqs.net> To: <boost@lists.boost.org> Sent: Monday, June 01, 2009 9:07 PM Subject: [boost] boost.timer library submission...
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.
I'm interested as I have already request interest for the same functionality. You can take a lock at Boost.Asio that implent it on the context of its io service class.
Where do I begin for submitting it?
Attach a zip file on the Boost Vault. Best, Vicente

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 requests? What platforms does the library work on? BR, Dmitry

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.
would boost::asio::deadline_timer meet your needs? [snip]
participants (5)
-
Dmitry Goncharov
-
Jamie Allsop
-
JohnQ
-
Stewart, Robert
-
vicente.botet