Srdjan Grubor added the comment:
The code around tarfile multi-threading was fixed for me on the user-side with
threading.Lock() usage so it might work to use this within the library and the
directory creation could be improved by probably doing a try/except around the
makedirs() call with ignoring of the exception if it's FileExistsError - my
code I use elsewhere fixes this with:
def _safe_makedirs(self, dir_path):
try:
makedirs(dir_path)
# Concurrency problems need to be handled. If two threads create
# the same dir, there might be a race between them checking and
# doing makedirs so we handle that as gracefully as possible here.
except FileExistsError as fee:
if not os.path.isdir(dir_path):
raise fee
If I get time, I'll submit a patch but it seems like I probably won't for this.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23649>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com