|
Boost Users : |
Subject: Re: [Boost-users] Boost asio deadline_timer, bug?
From: Arash Partow (arash_at_[hidden])
Date: 2011-08-19 04:33:03
Allan Nielsen wrote:
> Is this a bug, or am I doing something wrong?
>
>
No bug here (I think), as per [1], a cancelled operation will be invoked
with an error code - this is so one can discern between a normal
invocation and a cancel or error.
Your handler could be updated like so:
void handler(const boost::system::error_code &ec)
{
if (!ec)
{
cout << "Forbidden handler" << endl;
assert(0);
}
else
cout << "Timer1 interrupted by someone." << endl;
}
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net