delete information only after successfull unlock

This commit is contained in:
einhorn_b 2021-06-16 11:07:30 +02:00
parent 091ce48011
commit 7785a0b5a6

View File

@ -21,7 +21,7 @@
***************************************************************************/
/*!
\brief Container Wrapper class for mutex protected container
changed to poco mutex for gradido login server
default mutex from poco is recursive so it is some heavy thing
@ -47,7 +47,7 @@ namespace UniLib {
// \return false if mutex was locked from another thread
bool tryLock();
inline void unlock() { mLastSucceededLock = ""; mWorkMutex.unlock(); }
inline void unlock() { mWorkMutex.unlock(); mLastSucceededLock = ""; }
inline const std::string& getLastSucceededLock() { return mLastSucceededLock; }
protected:
@ -58,4 +58,4 @@ namespace UniLib {
}
}
#endif //__DR_UNIVERSUM_LIB_LIB_MULTITHREAD_CONTAINER_H__
#endif //__DR_UNIVERSUM_LIB_LIB_MULTITHREAD_CONTAINER_H__