Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Make the accounts thread safe #109

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

TheoKah
Copy link

@TheoKah TheoKah commented Mar 18, 2019

When multiple give/take/set commands arrive at the same time the final amount was not correct.

You can try that by copy/paste a few /econ add X A commands in a file and copy/paste them all at the same time in console.

@liach
Copy link

liach commented Mar 19, 2019

this code doesn't look.very easy to maintain... i hope you can use braces around the lock blocks and use finally to unlock.

@TheoKah
Copy link
Author

TheoKah commented Mar 19, 2019

Do you prefer this one @liach ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants