// with this mutex locked.
MultiThreadingLock send_lock(*send_mutex_);
- // Fetch the next one to send (outside the mutex).
+ // Fetch the next one to send (outside the mutex) to avoid a possible
+ // deadlock with the mutex in the @ref PingCheckMgr::nextToSend callback.
PingContextPtr context = ((next_to_send_cb_)());
if (!context) {
// Nothing to send.
/// @brief Tag for index by expiration time.
struct ExpirationIndexTag { };
-/// @brief Tag for index by state.
-struct StateIndexTag { };
-
/// @brief A multi index container holding pointers to PingContexts.
///
/// The contexts in the container may be accessed using different indexes:
boost::multi_index::const_mem_fun<PingContext, const TimeStamp&,
&PingContext::getNextExpiry>
>
- >,
-
- // Specification of the fifth index starts here.
- // This index sorts contexts by State.
- boost::multi_index::ordered_non_unique<
- boost::multi_index::tag<StateIndexTag>,
- boost::multi_index::const_mem_fun<PingContext, PingContext::State,
- &PingContext::getState>
>
>
> PingContextContainer;