Skip to content

Fix race condition in IORef backend#55

Open
konsumlamm wants to merge 1 commit intoHeinrichApfelmus:masterfrom
konsumlamm:race
Open

Fix race condition in IORef backend#55
konsumlamm wants to merge 1 commit intoHeinrichApfelmus:masterfrom
konsumlamm:race

Conversation

@konsumlamm
Copy link
Copy Markdown
Contributor

This should fix the race condition in the IORef backend. As far as I can tell, the race condition can only appear if the same Key is used in multiple Vaults. By adding an MVar () to the Key, we can ensure that only one thread accesses the stored IORef at a time.

@HeinrichApfelmus
Copy link
Copy Markdown
Owner

Thank you! Sorry for the delay.

I like this, but this is I think the point where I should add some unit / property tests to the package. It's worth testing that the race condition is indeed gone.

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