Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix a few race conditions in mocknet #1867

Merged
merged 1 commit into from
Oct 20, 2015
Merged

fix a few race conditions in mocknet #1867

merged 1 commit into from
Oct 20, 2015

Conversation

whyrusleeping
Copy link
Member

PSA: if you think you need a RWMutex, you probably dont, if you really think you do, double check that your data is safe to read concurrently. (go's maps are not)

License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
@jbenet jbenet added the status/in-progress In progress label Oct 20, 2015
@whyrusleeping
Copy link
Member Author

Theres still a race around there, but its because logrus isnt threadsafe (or we're not using it right). Worst case on that one is just that we get a weird looking log entry. I'm gonna punt on fixing it for now.

@whyrusleeping whyrusleeping added kind/bug A bug in existing code (including security flaws) topic/race Topic race RFCR labels Oct 20, 2015
jbenet added a commit that referenced this pull request Oct 20, 2015
fix a few race conditions in mocknet
@jbenet jbenet merged commit 795e242 into master Oct 20, 2015
@jbenet jbenet removed the status/in-progress In progress label Oct 20, 2015
@jbenet jbenet deleted the fix/mocknet-race branch October 20, 2015 19:48
@jbenet
Copy link
Member

jbenet commented Oct 20, 2015

Worst case on that one is just that we get a weird looking log entry. I'm gonna punt on fixing it for now.

if it's not a panic, fine

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/race Topic race
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants