tvalentyn commented on a change in pull request #16250:
URL: https://github.com/apache/beam/pull/16250#discussion_r773532355



##########
File path: sdks/python/apache_beam/internal/cloudpickle_pickler.py
##########
@@ -99,6 +103,14 @@ def _create_absl_flags():
   return flags.FLAGS
 
 
+def _pickle_rlock(obj):
+  return _create_rlock, tuple([])
+
+
+def _create_rlock():
+  return RLOCK_TYPE()

Review comment:
       Ok. perhaps I was asking a wrong question. I was looking at
   
https://github.com/cloudpipe/cloudpickle/blob/5d89947288a18029672596a4d719093cc6d5a412/cloudpickle/cloudpickle_fast.py#L528,
 and it seemed to me that the reduce function (e.g. `_mappingproxy_reduce`) 
returns a tuple: Type object + Arguments.
   
   While in your case `_pickle_rlock` returns an instance of the type (i.e. 
actual RLock) + arguments. 




-- 
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