Skip to content

prevent closing concurrently with other operations.#42

Merged
willscott merged 1 commit intomasterfrom
bug/race-close
Feb 25, 2020
Merged

prevent closing concurrently with other operations.#42
willscott merged 1 commit intomasterfrom
bug/race-close

Conversation

@willscott
Copy link
Copy Markdown
Contributor

Add a sync.RWMutex protecting the Close operation.
Follows the same pattern as in go-ds-badger.
Address #29 / ipfs/kubo#6880

Copy link
Copy Markdown
Contributor

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this. Left a couple comments to look into.

@willscott willscott marked this pull request as ready for review February 21, 2020 21:57
Copy link
Copy Markdown
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one thing to check. Merge when you've either locked on i.Release() or have confirmed that this isn't an issue (and left a comment in the code?).

Add a `sync.RWMutex` protecting the Close operation.
Follows the same pattern as in go-ds-badger.
Address #29 / ipfs/kubo#6880
@willscott willscott merged commit 8e15c83 into master Feb 25, 2020
@willscott willscott deleted the bug/race-close branch February 25, 2020 16:19
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.

3 participants