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

Use sync.RWMutex in sessionData to allow concurrent readers #206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pete-woods
Copy link

@pete-woods pete-woods commented Apr 9, 2024

  • I have a custom store that wants to read domain-specific values out of the session (to maintain a table associating users with sessions, so they can be listed and deleted efficiently).
  • At present stores cannot access the session data, as this causes a deadlock on the sync.Mutex.
  • I've tried to carefully go through each accessor of the mutex and convert those that perform only read operations to RWLocks.
  • I'd expect this is also a small general performance improvement in any situation where you're reading from the session data concurrently.

@pete-woods pete-woods changed the title Rw mutex Use rwmutex in sessionData to allow concurrent readers Apr 9, 2024
@pete-woods pete-woods changed the title Use rwmutex in sessionData to allow concurrent readers Use sync.RWMutex in sessionData to allow concurrent readers Apr 9, 2024
@pete-woods pete-woods marked this pull request as ready for review April 9, 2024 11: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

1 participant