Skip to content
Snippets Groups Projects
Commit ed3b4a2f authored by Alex Buts's avatar Alex Buts
Browse files

refs #6362 attempt to fix mutexing issue on Unix

(not fully tested yet on Win but there are hopes. )
parent da9accaf
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,8 @@ namespace Kernel
// Typedefs for ThreadPool
/// General mutex (typedef'd to Poco::FastMutex). Not recursive in general; don't assume it is!
typedef Poco::FastMutex Mutex;
typedef Poco::FastMutex NonRecursiveMutex;
typedef Poco::Mutex Mutex;
} //namespace
} //namespace
......
......@@ -69,6 +69,7 @@ namespace Kernel
// And put it in the queue of stuff to write.
// std::cout << "DiskBuffer adding ID " << item->getId() << " to current size " << m_writeBuffer.size() << std::endl;
// TODO: check what happens when the same element is inserted with different size
std::pair<writeBuffer_t::iterator,bool> result = m_writeBuffer.insert(item);
// Result.second is FALSE if the item was already there
......@@ -95,11 +96,11 @@ namespace Kernel
*/
void DiskBuffer::objectDeleted(const ISaveable * item)
{
m_mutex.lock();
// const uint64_t sizeOnFile
size_t id = item->getId();
uint64_t size = item->getDataMemorySize();
m_mutex.lock();
// Take it out of the to-write buffer
writeBuffer_byId_t::iterator it2 = m_writeBuffer_byId.find(id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment