Commit 1e679811 authored by Sylvain Thery's avatar Sylvain Thery

mutex for askMarker

parent 779a8741
......@@ -159,7 +159,7 @@ AttributeMultiVector<MarkerBool>* GenericMap::askMarkVector()
{
assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded") ;
// boost::mutex::scoped_lock lockMV(m_MarkerStorageMutex[ORBIT]);
boost::mutex::scoped_lock lockMV(m_MarkerStorageMutex[ORBIT]);
if (!m_markVectors_free[ORBIT].empty())
{
AttributeMultiVector<MarkerBool>* amv = m_markVectors_free[ORBIT].back();
......@@ -168,7 +168,7 @@ AttributeMultiVector<MarkerBool>* GenericMap::askMarkVector()
}
//else add attribute
AttributeMultiVector<MarkerBool>* amv = m_attribs[ORBIT].addAttribute<MarkerBool>("") ;
std::cout << "ADD ATTRIBUTE"<< std::endl;
// std::cout << "ADD ATTRIBUTE"<< std::endl;
return amv;
}
......@@ -178,7 +178,7 @@ inline void GenericMap::releaseMarkVector(AttributeMultiVector<MarkerBool>* amv)
{
assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded") ;
// boost::mutex::scoped_lock lockMV(m_MarkerStorageMutex[ORBIT]);
boost::mutex::scoped_lock lockMV(m_MarkerStorageMutex[ORBIT]);
m_markVectors_free[ORBIT].push_back(amv);
}
......
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