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

Add NewSyncLockMap[K,V](...) helper #226

Closed
Mzack9999 opened this issue Jul 28, 2023 · 0 comments · Fixed by #227
Closed

Add NewSyncLockMap[K,V](...) helper #226

Mzack9999 opened this issue Jul 28, 2023 · 0 comments · Fixed by #227
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@Mzack9999
Copy link
Member

SyncLockMap turned out to be very useful as LOC reduction strategy since it can replace any builtin map that requires a mutex. Actually the structure must be initialized with some long boilerplate code as follows:

m := &SyncLockMap[string, string]{
	Map: make(map[string, string]),
}

The task is about implementing a NewSyncLockMap[K,V](...) function that returns new SyncLockMap with the underlying Map initialized

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Jul 28, 2023
@dogancanbakir dogancanbakir self-assigned this Jul 28, 2023
@Mzack9999 Mzack9999 added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants