Skip to content

update example to handle race condition#445

Open
freimer wants to merge 1 commit into
hashicorp:masterfrom
freimer:plugin-hashicups-secret
Open

update example to handle race condition#445
freimer wants to merge 1 commit into
hashicorp:masterfrom
freimer:plugin-hashicups-secret

Conversation

@freimer
Copy link
Copy Markdown

@freimer freimer commented Sep 25, 2024

The example code does not include a check to see if another goroutine created the client between the b.lock.RUnlock() and b.lock.Lock() calls. As this is required for all clients to properly handle this race condition, it should be included in the example code.

The example code does not include a check to see if another goroutine created the client between the b.lock.RUnlock() and b.lock.Lock() calls.  As this is required for all clients to properly handle this race condition, it should be included in the example code.
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.

1 participant