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

Check for possible dead-locks #53

Open
Tracked by #27
stv0g opened this issue Jul 31, 2023 · 1 comment
Open
Tracked by #27

Check for possible dead-locks #53

stv0g opened this issue Jul 31, 2023 · 1 comment

Comments

@stv0g
Copy link
Collaborator

stv0g commented Jul 31, 2023

By @koraa in #27 (comment)

https://github.com/stv0g/go-rosenpass/blob/d7e38ecaf9e7803f2824a03ac24ac34944a53af6/server.go#L251

Severity: N/A – How do you make sure all these locks never cause a dead-lock situation?

@stv0g
Copy link
Collaborator Author

stv0g commented Aug 8, 2023

The go-rosenpass codebase:

  • uses no channels which could potentially block
  • uses two read-write mutexes (sync.RWMutex):

All locks are covering minimally sized critical regions (usually just an access to a slice or map) with no control flow paths allowing for keeping locks longer than necessary.

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

No branches or pull requests

1 participant