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

Experimental: Add lock on game objects #550

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

Conversation

miniduikboot
Copy link
Member

@miniduikboot miniduikboot commented Nov 16, 2023

Description

We see rare problems where multiple messages on the same game arriving at the same game cause issues. This commit adds a coarse-grained lock on all interactions with a game by adding a binary semaphore.

Because manually adding try{} finally{} blocks seems verbose, I added a RAII-style LockGuard that locks the semaphore on creation and drops it when disposed.

Closes issues

miniduikboot and others added 2 commits December 17, 2023 20:45
We see rare problems where multiple messages on the same game arriving at
the same game cause issues. This commit adds a coarse-grained lock on
all interactions with a game by adding a binary semaphore.

Because manually adding try{} finally{} blocks seems verbose, I added a
RAII-style LockGuard that locks the semaphore on creation and drops it
when disposed.
@js6pak js6pak changed the base branch from feature/2023.10.24 to master December 17, 2023 22:32
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.

None yet

2 participants