Dispatch new zone, update zone events.

This commit is contained in:
Bartosz Taudul 2017-09-14 21:05:01 +02:00
parent e3edd7e336
commit c0dd0ef5bc
2 changed files with 14 additions and 3 deletions

View File

@ -162,16 +162,16 @@ void View::ProcessZoneBegin( uint64_t id, const QueueZoneBegin& ev )
if( it == m_pendingEndZone.end() ) if( it == m_pendingEndZone.end() )
{ {
m_data.emplace_back( Event { ev.time, -1 } ); m_data.emplace_back( Event { ev.time, -1 } );
NewZone( idx );
lock.unlock(); lock.unlock();
m_openZones.emplace( id, idx ); m_openZones.emplace( id, idx );
} }
else else
{ {
assert( ev.time <= it->second.time ); assert( ev.time <= it->second.time );
m_data.emplace_back( Event { ev.time, it->second.time } ); m_data.emplace_back( Event { ev.time, it->second.time } );
NewZone( idx );
lock.unlock(); lock.unlock();
m_pendingEndZone.erase( it ); m_pendingEndZone.erase( it );
} }
} }
@ -189,8 +189,8 @@ void View::ProcessZoneEnd( uint64_t id, const QueueZoneEnd& ev )
std::unique_lock<std::mutex> lock( m_lock ); std::unique_lock<std::mutex> lock( m_lock );
assert( ev.time >= m_data[idx].start ); assert( ev.time >= m_data[idx].start );
m_data[idx].end = ev.time; m_data[idx].end = ev.time;
UpdateZone( idx );
lock.unlock(); lock.unlock();
m_openZones.erase( it ); m_openZones.erase( it );
} }
} }
@ -214,4 +214,12 @@ void View::AddString( uint64_t ptr, std::string&& str )
m_strings.emplace( ptr, std::move( str ) ); m_strings.emplace( ptr, std::move( str ) );
} }
void View::NewZone( uint64_t idx )
{
}
void View::UpdateZone( uint64_t idx )
{
}
} }

View File

@ -40,6 +40,9 @@ private:
void CheckString( uint64_t ptr ); void CheckString( uint64_t ptr );
void AddString( uint64_t ptr, std::string&& str ); void AddString( uint64_t ptr, std::string&& str );
void NewZone( uint64_t idx );
void UpdateZone( uint64_t idx );
std::string m_addr; std::string m_addr;
Socket m_sock; Socket m_sock;