mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Mutex for some static init functions
This commit is contained in:
@@ -277,6 +277,7 @@ Standard_Boolean Message_MsgFile::LoadFromEnv (const Standard_CString theEnvName
|
||||
const Standard_CString theFileName,
|
||||
const Standard_CString theLangExt)
|
||||
{
|
||||
Standard_Mutex::Sentry aSentry(theMutex);
|
||||
TCollection_AsciiString aLangExt (theLangExt != NULL ? theLangExt : "");
|
||||
if (aLangExt.IsEmpty())
|
||||
{
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include <ShapeProcess_OperLibrary.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Version.hxx>
|
||||
#include <Standard_Mutex.hxx>
|
||||
#include <StepAP214_Protocol.hxx>
|
||||
#include <STEPControl_ActorRead.hxx>
|
||||
#include <STEPControl_ActorWrite.hxx>
|
||||
@@ -62,10 +63,14 @@ IMPLEMENT_STANDARD_RTTIEXT(STEPControl_Controller,XSControl_Controller)
|
||||
STEPControl_Controller::STEPControl_Controller()
|
||||
: XSControl_Controller("STEP", "step")
|
||||
{
|
||||
RWHeaderSection::Init();
|
||||
|
||||
myAdaptorProtocol = new StepAP214_Protocol();
|
||||
RWStepAP214::Init(Handle(StepAP214_Protocol)::DownCast(myAdaptorProtocol));
|
||||
|
||||
static Standard_Mutex aPars;
|
||||
{
|
||||
Standard_Mutex::Sentry aLock(aPars);
|
||||
RWHeaderSection::Init();
|
||||
RWStepAP214::Init(Handle(StepAP214_Protocol)::DownCast(myAdaptorProtocol));
|
||||
}
|
||||
|
||||
Handle(STEPControl_ActorWrite) ActWrite = new STEPControl_ActorWrite;
|
||||
myAdaptorWrite = ActWrite;
|
||||
|
Reference in New Issue
Block a user