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

Instance should not be freed to pool twice #6

Open
samreid opened this issue Apr 30, 2014 · 1 comment
Open

Instance should not be freed to pool twice #6

samreid opened this issue Apr 30, 2014 · 1 comment

Comments

@samreid
Copy link
Member

samreid commented Apr 30, 2014

Currently it is possible to free an instance to the pool twice, which could lead to disasterous results (since it could be popped from the pool twice and mutated by different clients).

Possible solutions:

  1. Add a check to the pool to make sure an instance is not already in the pool (by iterating over the existing pool when an item is added to the pool)
  2. Add a field to Poolable instances that indicates whether they are alive or in the pool
  3. Add your own idea here!
@pixelzoom
Copy link
Contributor

Presumably this issue is referring to Poolable.

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

No branches or pull requests

2 participants