Main Page
Namespaces
Classes
Package Documentation
FWCore
Concurrency
src
Xerces.cc
Go to the documentation of this file.
1
#include "
FWCore/Concurrency/interface/Xerces.h
"
2
#include <xercesc/util/PlatformUtils.hpp>
3
#include <mutex>
4
#include <thread>
5
6
XERCES_CPP_NAMESPACE_USE
7
8
namespace
cms
{
9
namespace
concurrency {
10
namespace
{
11
std::mutex
g_xerces_mutex;
12
}
13
// We need to make sure these serialized are only called by one
14
// thread at the time. Until the first Init succeeds the other threads
15
// should not be allowed to proceed. We also do not want two different
16
// threads calling Init and Finalize at the same time. We therefore simply
17
// use a global mutex to serialize everything.
18
void
xercesInitialize
() {
19
std::unique_lock<std::mutex>
l
(g_xerces_mutex);
20
XMLPlatformUtils::Initialize();
21
}
22
23
void
xercesTerminate
() {
24
std::unique_lock<std::mutex>
l
(g_xerces_mutex);
25
XMLPlatformUtils::Terminate();
26
}
27
}
28
}
29
mutex
static boost::mutex mutex
Definition:
Proxy.cc:11
cms::concurrency::xercesTerminate
void xercesTerminate()
Definition:
Xerces.cc:23
XERCES_CPP_NAMESPACE_USE
Definition:
XMLConfigWriter.cc:41
cms::concurrency::xercesInitialize
void xercesInitialize()
Definition:
Xerces.cc:18
cms
Definition:
ProducerAnalyzer.cc:21
Xerces.h
checklumidiff.l
l
Definition:
checklumidiff.py:65
Generated for CMSSW Reference Manual by
1.8.11