Skip to content

datacache: make m_MDLDict threadsafe (other things still are not!)#156

Closed
RaphaelIT7 wants to merge 1 commit intoSource-Authors:masterfrom
RaphaelIT7:rmod-patch-2-split-6
Closed

datacache: make m_MDLDict threadsafe (other things still are not!)#156
RaphaelIT7 wants to merge 1 commit intoSource-Authors:masterfrom
RaphaelIT7:rmod-patch-2-split-6

Conversation

@RaphaelIT7
Copy link
Contributor

@RaphaelIT7 RaphaelIT7 commented Nov 17, 2025

Depends on #159

@dimhotepus dimhotepus force-pushed the master branch 5 times, most recently from 739a853 to a997975 Compare January 5, 2026 13:14
@dimhotepus dimhotepus force-pushed the master branch 2 times, most recently from a237f58 to 6699560 Compare January 26, 2026 13:57
@dimhotepus
Copy link
Member

dimhotepus commented Feb 8, 2026

I will close these thread-safety PRs for now.

The problem is they make entities more threadsafe, but not fully threadsafe.
I think we should follow another approach - these things should be const + member functions should be const.

If all is const, it means entities are immutable and can be used anywhere without synchronization overhead

If logically or by ThreadSanitizer we find a real bug, such PRs will be accepted.

@dimhotepus dimhotepus closed this Feb 8, 2026
@RaphaelIT7
Copy link
Contributor Author

The problem is they make entities more threadsafe, but not fully threadsafe.
The focus for these changes mainly was on loading- when joining I've tested them.

If you'd ever want to test for these parallel issues
I locally had this commit applied to my rmod branch, using which I've then made all these changes.
The specific change: RaphaelIT7@c840dea#diff-583412cae94d9826fc2266aaf0c6d6f40beeee30f61d0468b9537773f4e900e3
(It's quite good at showing threading issues xd)

I'll definitely look into seeing which things to make const & such and see how far I get with your suggestion :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants