Skip to content

Avoid corruption for non-concurrent collections#158

Open
mitikov wants to merge 9 commits intofluentsprings:masterfrom
mitikov:multithreading/avoid-corruption
Open

Avoid corruption for non-concurrent collections#158
mitikov wants to merge 9 commits intofluentsprings:masterfrom
mitikov:multithreading/avoid-corruption

Conversation

@mitikov
Copy link

@mitikov mitikov commented Dec 22, 2021

There are multiple times plain dictionaries are looked through while being updated (possibly by multiple threads):

image

image

I've switched to reference-level concurrency - make a full copy of the dictionary & add a new value there & swap references.

This is optimal as mapping calls are far more dominant in numbers then inserts.

Fixes #150

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.

The cache used by CompileNonGenericCustomTypeMapper is not thread-safe

1 participant

Comments