Boost logo

Boost Users :

Subject: [Boost-users] [asio]How to insure async handles not be called after calling deadline_timer::cancel()?
From: öÎì¿ÁÎ (cometliao_at_[hidden])
Date: 2010-10-12 03:19:42


The document says,

If the timer has already expired when cancel() is called, then the
handlers for asynchronous wait operations will:

have already been invoked; or
have been queued for invocation in the near future.

These handlers can no longer be cancelled, and therefore are passed an
error code that indicates the successful completion of the wait
operation.

Does this mean that async handlers may be called after calling
deadline_timer::cancel() (say, the second curcumstance) ?
If yes, it seems make things unintuitive, eg. delete the resources
that associate with handlers after cancel().
Is there any way to suppress or identify these handlers?

thx.


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