void CQuotesProviderBase::OnEndRun() { TContracts anContacts; { mir_cslock lck(m_cs); anContacts = m_aContacts; m_aRefreshingContacts.clear(); } CBoolGuard bg(m_bRefreshInProgress); std::for_each(anContacts.begin(), anContacts.end(), boost::bind(&SetContactStatus, _1, ID_STATUS_OFFLINE)); }
void CQuotesProviderBase::OnEndRun() { TContracts anContacts; {// for CCritSection CGuard<CLightMutex> cs(m_cs); anContacts = m_aContacts; m_aRefreshingContacts.clear(); } CBoolGuard bg(m_bRefreshInProgress); std::for_each(anContacts.begin(),anContacts.end(),boost::bind(&SetContactStatus,_1,ID_STATUS_OFFLINE)); }