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



##########
File path: sdks/python/apache_beam/internal/pickler.py
##########
@@ -55,13 +55,9 @@ def __exit__(self, *unused_exc_info):
     pass
 
 
-if sys.version_info[0] > 2:
-  # Pickling, especially unpickling, causes broken module imports on Python 3
-  # if executed concurrently, see: BEAM-8651, 
http://bugs.python.org/issue38884.
-  _pickle_lock_unless_py2 = threading.RLock()
-else:
-  # Avoid slow reentrant locks on Py2. See: https://bugs.python.org/issue3001.
-  _pickle_lock_unless_py2 = _NoOpContextManager()
+# Pickling, especially unpickling, causes broken module imports on Python 3
+# if executed concurrently, see: BEAM-8651, http://bugs.python.org/issue38884.
+_pickle_lock_unless_py2 = threading.RLock()

Review comment:
       we could call it _pickle_lock now




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

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


Reply via email to