ryanthompson591 commented on a change in pull request #16250:
URL: https://github.com/apache/beam/pull/16250#discussion_r771516598
##########
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:
I added two tests. One for the default lib (dill) and one for
cloudpickle.
Also I want to return RLOCK_TYPE() which makes a new instance of the type.
Dill does it similarily here:
https://github.com/uqfoundation/dill/blob/04aba03432955f64c05441ffe0553af987c087ff/dill/_dill.py#L744
What dill does that doesn't make any sense for cloud pickle is it also tries
to populate whether or not the lock is locked. That might make sense for save
session but makes no sense when it is just a class
--
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]