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

Make Host.add function thread safe #67

Closed
cynepco3hahue opened this issue Aug 17, 2016 · 0 comments
Closed

Make Host.add function thread safe #67

cynepco3hahue opened this issue Aug 17, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@cynepco3hahue
Copy link
Collaborator

Now if I create two Host resources in different threads with the same IP I can fall in the situation:

  1. first thread check and see that the host exists under inventory
  2. second thread see that the host exists under inventory
  3. first thread run self.inventory.remove(host)
  4. second thread run self.inventory.remove(host)
  5. second thread fails with "list.remove(x): x not in list"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants