Subject: Re: [boost] [asio] global timer cancellation?
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2009-03-19 07:59:05
On Thu, Mar 19, 2009 at 7:26 PM, Brian and Victoria <bnv_at_[hidden]> wrote:
> I've got various objects that make use of the asio deadline timer to
> schedule events. Â The problem is that there isn't a central repository of
> timer references that I can walk to cancel them when shutting down asio.
> Â I'd like to be able to just tell asio to cancel any pending work and have
> the thread(s) return. Â Is this possible? Â I came across the io_service::work
> class but haven't yet found an example of how it works.
How about making one yourself and putting shared_ptr<deadline_timer>'s
in a dequeue that you can later access when shutting down?
-- Dean Michael Berris | Software Engineer, Friendster, Inc. blog.cplusplus-soup.com | twitter.com/mikhailberis | linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | deanberris.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk