Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step thread safety improvement #307

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

AtheneNoctuaPt
Copy link
Contributor

Mutex is added to XSControl_WorkSession to prevent data races during reading and writing.

@AtheneNoctuaPt AtheneNoctuaPt added 2. Bug Something isn't working 1. Data Exchange Import/Export or iterating of the CAD data labels Jan 30, 2025
@AtheneNoctuaPt AtheneNoctuaPt requested a review from a team January 30, 2025 13:40
@AtheneNoctuaPt AtheneNoctuaPt self-assigned this Jan 30, 2025
AtheneNoctuaPt added a commit to AtheneNoctuaPt/OCCT that referenced this pull request Jan 30, 2025
Mutex is added to XSControl_WorkSession to prevent data races during reading and writing.
@AtheneNoctuaPt AtheneNoctuaPt changed the title Step thread safety improvement #177 Step thread safety improvement #307 Jan 30, 2025
AtheneNoctuaPt added a commit to AtheneNoctuaPt/OCCT that referenced this pull request Jan 30, 2025
Mutex is added to XSControl_WorkSession to prevent data races during reading and writing.
Copy link
Member

@dpasukhi dpasukhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here a few remarks and please add some tests with public CAD files to validate your new commands.

Handle(XSControl_Controller) myController;
Handle(XSControl_TransferReader) myTransferReader;
Handle(XSControl_TransferWriter) myTransferWriter;
XSControl_WorkSessionMap myContext;
Handle(XSControl_Vars) myVars;

static Standard_Mutex myGlobalMutex; //!< Mutex to prevent data races during reading and writing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please hide it into singleton inside CXX

AtheneNoctuaPt added a commit to AtheneNoctuaPt/OCCT that referenced this pull request Jan 30, 2025
Mutex is added to XSControl_WorkSession to prevent data races
during reading and writing.
Tests are added to check the behavior of STEP readers/writers in
multithreading environment.
AtheneNoctuaPt added a commit to AtheneNoctuaPt/OCCT that referenced this pull request Jan 30, 2025
Mutex is added to XSControl_WorkSession to prevent data races
during reading and writing.
Tests are added to check the behavior of STEP readers/writers in
multithreading environment.
Mutex is added to XSControl_WorkSession to prevent data races
during reading and writing.
Tests are added to check the behavior of STEP readers/writers in
multithreading environment.
@dpasukhi dpasukhi changed the title Step thread safety improvement #307 Step thread safety improvement Jan 30, 2025
@dpasukhi dpasukhi self-requested a review January 30, 2025 17:41
@dpasukhi dpasukhi merged commit 870d891 into Open-Cascade-SAS:IR Jan 30, 2025
20 checks passed
@dpasukhi dpasukhi linked an issue Jan 30, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Data Exchange Import/Export or iterating of the CAD data 2. Bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Step thread safety improvement
2 participants