Skip to content

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

Open
@marcintustin

Description

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.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions