Commit 7cdba23c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Revert "Parser: Remove unneeded lock"

This reverts commit 5ac40117.
There was no lock involved, I blame E_NOCOFEE :|
parent 831dddf0
......@@ -25,7 +25,7 @@ Parser::~Parser()
void Parser::addService(std::unique_ptr<IMetadataService> service)
{
// Assume no services will be added after the parser has been initialized
m_services.push_back( std::move( service ) );
std::push_heap( m_services.begin(), m_services.end(), []( const ServicePtr& a, const ServicePtr& b )
{
// We want higher priority first
......@@ -57,7 +57,7 @@ void Parser::run()
{
m_cond.wait( lock, [this]() { return m_tasks.empty() == false || m_stopParser == true; });
// We might have been woken up because the parser is being destroyed
if ( m_stopParser == true )
if ( m_stopParser == true )
return;
}
// Otherwise it's safe to assume we have at least one element.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment