-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
enhancementNew features or improvements to existing functionalityNew features or improvements to existing functionality
Description
Describe the Request
When a proxy is going to be immediately used on the local process that created the proxy, the default behavior is that the proxy is going to be resolved. This is pretty inefficient if we already have the target object on the local process. Let's expose a populate_target flag in Store.proxy() that will set __wrapped__ on the returned proxy to the input object that was proxied.
The populate_target flag will default to False to (1) maintain the existing functionality by default and (2) because setting __wrapped__ will cause the proxy to hold a reference to the target which could cause extra memory usage (probably pretty unlikely, but still...).
This will not effect pickling a Proxy because Proxy only pickles its factory.
Sample Code
No response
Metadata
Metadata
Assignees
Labels
enhancementNew features or improvements to existing functionalityNew features or improvements to existing functionality