The sample code looks long, but actually it\'s not so complicated :-)
What I\'m trying to do is, when a user calls EventTimer.Start(), it will execute the callba
As Sam hinted, depending on what you're attempting to accomplish, most of the time it is considered a design error to stop an io_service. You do not need to stop()
/reset()
the io_service in order to reschedule a timer.
Normally you would leave a thread or thread pool running attatched to an io_service
and then you would schedule whatever event you need with the io_service
. With the io_service
machinery in place, leave it up to the io_service
to dispatch your scheduled work as requested and then you only have to work with the events or work requests that you schedule with the io_service
.