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

Use WeakKeyDictionary for caching types in is_future_like #76

Merged

Conversation

freininghaus
Copy link

This allows types to be garbage collected if they are not referenced
any more elsewhere, and can prevent out-of-memory issues in applications
that dynamically create new types and use them in Promises.

This fixes issue #75 (possible out-of-memory if dynamically generated types are used in Promises).

Frank Reininghaus added 4 commits July 19, 2019 15:25
This allows types to be garbage collected if they are not referenced
any more elsewhere, and can prevent out-of-memory issues in applications
that dynamically create new types and use them in Promises.
mypy complained that WeakKeyDictionary is not a Dict[type, bool].
@syrusakbary syrusakbary merged commit d99384f into syrusakbary:master Dec 18, 2019
alex-verve pushed a commit to alex-verve/graphene that referenced this pull request May 15, 2020
it has following fixes:
* Make Promise and Dataloader thread-safe syrusakbary/promise#81
* Fix memory leak on dynamically created types syrusakbary/promise#76
* and more https://github.com/syrusakbary/promise/releases
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.

None yet

2 participants