Skip to content
Snippets Groups Projects
Commit b08a2058 authored by Peter van Gemmeren's avatar Peter van Gemmeren
Browse files

Some minor clean ups for multi threading

parent 142c1975
No related branches found
No related tags found
No related merge requests found
...@@ -124,7 +124,7 @@ protected: // data ...@@ -124,7 +124,7 @@ protected: // data
const Token* m_i_poolToken; const Token* m_i_poolToken;
typedef std::mutex CallMutex; typedef std::mutex CallMutex;
mutable CallMutex m_conv_mut; CallMutex m_conv_mut;
}; };
#endif #endif
...@@ -169,8 +169,10 @@ T_AthenaPoolCustCnv<TRANS, PERS>::PoolToDataObject(DataObject*& pObj, ...@@ -169,8 +169,10 @@ T_AthenaPoolCustCnv<TRANS, PERS>::PoolToDataObject(DataObject*& pObj,
// the object that will be read next. Required by compareClassGuid() // the object that will be read next. Required by compareClassGuid()
template <class TRANS, class PERS> template <class TRANS, class PERS>
inline void T_AthenaPoolCustCnv<TRANS, PERS>::setToken(const std::string& token_str) { inline void T_AthenaPoolCustCnv<TRANS, PERS>::setToken(const std::string& token_str) {
if (this->m_i_poolToken == nullptr) this->m_i_poolToken = new Token; delete this->m_i_poolToken; this->m_i_poolToken = nullptr;
const_cast<Token*>(this->m_i_poolToken)->fromString(token_str); Token* token = new Token;
token->fromString(token_str);
this->m_i_poolToken = token; token = nullptr;
m_classID = this->m_i_poolToken->classID(); m_classID = this->m_i_poolToken->classID();
} }
//__________________________________________________________________________ //__________________________________________________________________________
......
...@@ -214,7 +214,7 @@ private: // properties ...@@ -214,7 +214,7 @@ private: // properties
/// Output FileNames to be associated with Stream Clients /// Output FileNames to be associated with Stream Clients
StringArrayProperty m_streamClientFilesProp; StringArrayProperty m_streamClientFilesProp;
mutable std::vector<std::string> m_streamClientFiles; std::vector<std::string> m_streamClientFiles;
/// MaxFileSizes, vector with maximum file sizes for Athena POOL output files /// MaxFileSizes, vector with maximum file sizes for Athena POOL output files
StringArrayProperty m_maxFileSizes; StringArrayProperty m_maxFileSizes;
...@@ -225,7 +225,7 @@ private: // properties ...@@ -225,7 +225,7 @@ private: // properties
/// default = false. /// default = false.
BooleanProperty m_persSvcPerOutput; BooleanProperty m_persSvcPerOutput;
unsigned outputContextId(const std::string& outputConnection); unsigned outputContextId(const std::string& outputConnection);
mutable std::mutex m_mutex; // mutable so const functions can lock std::mutex m_mutex;
/// SkipFirstChronoCommit, boolean property to skip the first commit in the chrono stats so the first /// SkipFirstChronoCommit, boolean property to skip the first commit in the chrono stats so the first
/// container being committed to disk is not 'tainted' with the POOL overhead /// container being committed to disk is not 'tainted' with the POOL overhead
......
...@@ -186,7 +186,7 @@ private: // data ...@@ -186,7 +186,7 @@ private: // data
coral::Context* m_context{nullptr}; coral::Context* m_context{nullptr};
pool::IFileCatalog* m_catalog{nullptr}; pool::IFileCatalog* m_catalog{nullptr};
std::vector<pool::IPersistencySvc*> m_persistencySvcVec; std::vector<pool::IPersistencySvc*> m_persistencySvcVec;
mutable std::vector<CallMutex*> m_pers_mut; std::vector<CallMutex*> m_pers_mut;
std::map<std::string, unsigned int> m_contextLabel; std::map<std::string, unsigned int> m_contextLabel;
std::string m_mainOutputLabel{}; std::string m_mainOutputLabel{};
std::map<unsigned int, unsigned int> m_contextMaxFile; std::map<unsigned int, unsigned int> m_contextMaxFile;
......
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