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 thread safe variants of viper.Set* functions #1972

Open
1 task done
marcintustin opened this issue Jan 7, 2025 · 0 comments
Open
1 task done

Add thread safe variants of viper.Set* functions #1972

marcintustin opened this issue Jan 7, 2025 · 0 comments
Labels
kind/enhancement New feature or request

Comments

@marcintustin
Copy link

Preflight Checklist

  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Problem Description

Like the people complaining in this thread, I just found out the viper.Set* methods are not thread safe. #268

Proposed Solution

Add corresponding viper.SetSafe* methods that use a mutex to control access to the global object

Alternatives Considered

Deprecate the global instance.

Write really explicit documentation that these viper.Set* functions are not thread safe.

Additional Information

I'm happy to work on an MR once (if) the approach is agreed.

@marcintustin marcintustin added the kind/enhancement New feature or request label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant