AnandInguva commented on code in PR #26202:
URL: https://github.com/apache/beam/pull/26202#discussion_r1174502512


##########
sdks/python/apache_beam/utils/multi_process_shared.py:
##########
@@ -126,6 +134,24 @@ class 
_SingletonRegistrar(multiprocessing.managers.BaseManager):
     callable=_process_level_singleton_manager.release_singleton)
 
 
+# By default, objects registered with BaseManager.register will have only
+# public methods available (excluding __call__). If you know the functions
+# you would like to expose, you can do so at register time with the `exposed`
+# attribute. Since we don't we will add a wrapper around the returned AutoProxy

Review Comment:
   ```suggestion
   # attribute. Since we don't, we will add a wrapper around the returned 
AutoProxy
   ```



##########
sdks/python/apache_beam/utils/multi_process_shared.py:
##########
@@ -126,6 +134,24 @@ class 
_SingletonRegistrar(multiprocessing.managers.BaseManager):
     callable=_process_level_singleton_manager.release_singleton)
 
 
+# By default, objects registered with BaseManager.register will have only
+# public methods available (excluding __call__). If you know the functions
+# you would like to expose, you can do so at register time with the `exposed`
+# attribute. Since we don't we will add a wrapper around the returned AutoProxy
+# object to handle __call__ function calls and turn them into
+# singletonProxy_call__ calls (which is a wrapper around the underlying
+# object's __call__ function)
+class _AutoProxyWrapper:
+  def __init__(self, proxyObject):

Review Comment:
   provide type annotations if possible?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to