This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients lars.gustaebel, r.david.murray, sgnn7, vstinner
Date 2015-03-16.08:39:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwavL25AFVpWk_YWxEZFmfsdLyD3GATiFRxALawx3Hp-eg@mail.gmail.com>
In-reply-to <1426489681.66.0.0951272215219.issue23649@psf.upfronthosting.co.za>
Content
Lars Gustäbel added the comment:
> I agree with David that there is no need for tarfile to be thread-safe. There is nothing to be gained from distributing one TarFile object among multiple threads because it operates on a single resource which has to be accessed sequentially anyway. So, it seems best to me if we leave it like it is and let the user add locks around it as she/he sees fit.

In asyncio, it was a design choice to not be thread-safe, to allow
more optimizations and support multiple implementations of asyncio,
without this important constraint.

I modified recently the asyncio doc to warn users in each class that
asyncio objects are *not* thread safe, with an explanation how to use
correctly asyncio with threads.

https://docs.python.org/dev/library/asyncio-eventloop.html#asyncio.BaseEventLoop
"This class is not thread safe."

Such change in tarfile doc is probably enough for tarfile.
History
Date User Action Args
2015-03-16 08:39:52vstinnersetrecipients: + vstinner, lars.gustaebel, r.david.murray, sgnn7
2015-03-16 08:39:52vstinnerlinkissue23649 messages
2015-03-16 08:39:52vstinnercreate