From 835b3cbee620e86b8bf9f11148610719f1400864 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 14 Mar 2024 22:56:41 +0000 Subject: [PATCH] 0033643: Data Exchange, Step Import - Multithread loading model issue Workaround for isolate loading entities functionality Needs to update logic to process in different threads different model three --- src/StepFile/StepFile_Read.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/StepFile/StepFile_Read.cxx b/src/StepFile/StepFile_Read.cxx index 26319a7c43..72a4a27749 100644 --- a/src/StepFile/StepFile_Read.cxx +++ b/src/StepFile/StepFile_Read.cxx @@ -42,10 +42,17 @@ #include +#include + #ifdef OCCT_DEBUG #define CHRONOMESURE #endif +namespace +{ + static Standard_Mutex THE_GLOBAL_READ_MUTEX; +} + void StepFile_Interrupt(Standard_CString theErrorMessage, const Standard_Boolean theIsFail) { if (theErrorMessage == NULL) @@ -109,7 +116,7 @@ static Standard_Integer StepFile_Read (const char* theName, #endif sout << " ... STEP File Read ...\n"; - + Standard_Mutex::Sentry aLocker(THE_GLOBAL_READ_MUTEX); Standard_Integer nbhead, nbrec, nbpar; aFileDataModel.GetFileNbR (&nbhead,&nbrec,&nbpar); // renvoi par lex/yacc Handle(StepData_StepReaderData) undirec =