Message238183
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. |
|
Date |
User |
Action |
Args |
2015-03-16 08:39:52 | vstinner | set | recipients:
+ vstinner, lars.gustaebel, r.david.murray, sgnn7 |
2015-03-16 08:39:52 | vstinner | link | issue23649 messages |
2015-03-16 08:39:52 | vstinner | create | |
|