Esempio n. 1
0
bool CEpgContainer::PersistAll(void)
{
  bool bReturn(true);
  CSingleLock lock(m_critSection);
  for (map<unsigned int, CEpg *>::iterator it = m_epgs.begin(); it != m_epgs.end(); it++)
  {
    CEpg *epg = it->second;
    lock.Leave();
    if (epg)
      bReturn &= epg->Persist(false);
    lock.Enter();
  }

  return bReturn;
}
Esempio n. 2
0
bool CEpgContainer::PersistAll(void)
{
  bool bReturn(true);
  m_critSection.lock();
  std::map<unsigned int, CEpg*> copy = m_epgs;
  m_critSection.unlock();
  
  for (EPGMAP_CITR it = copy.begin(); it != copy.end() && !m_bStop; it++)
  {
    CEpg *epg = it->second;
    if (epg && epg->NeedsSave())
    {
      bReturn &= epg->Persist();
    }
  }

  return bReturn;
}