Exemplo n.º 1
0
bool CSVNStatusCache::RemoveTimedoutBlocks()
{
    const ULONGLONG currentTicks = GetTickCount64();
    AutoLocker lock(m_NoWatchPathCritSec);
    std::vector<CTSVNPath> toRemove;
    for (std::map<CTSVNPath, ULONGLONG>::const_iterator it = m_NoWatchPaths.begin(); it != m_NoWatchPaths.end(); ++it)
    {
        if (currentTicks > it->second)
        {
            toRemove.push_back(it->first);
        }
    }
    if (toRemove.empty())
        return false;

    for (std::vector<CTSVNPath>::const_iterator it = toRemove.begin(); it != toRemove.end(); ++it)
    {
        if(UnBlockPath(*it))
            return true;
    }
    return false;
}
Exemplo n.º 2
0
bool CGitStatusCache::RemoveTimedoutBlocks()
{
    bool ret = false;
    DWORD currentTicks = GetTickCount();
    AutoLocker lock(m_NoWatchPathCritSec);
    std::vector<CTGitPath> toRemove;
    for (std::map<CTGitPath, DWORD>::const_iterator it = m_NoWatchPaths.begin(); it != m_NoWatchPaths.end(); ++it)
    {
        if (currentTicks > it->second)
        {
            toRemove.push_back(it->first);
        }
    }
    if (!toRemove.empty())
    {
        for (std::vector<CTGitPath>::const_iterator it = toRemove.begin(); it != toRemove.end(); ++it)
        {
            ret = ret || UnBlockPath(*it);
        }
    }

    return ret;
}