Make file objects as thread safe as the underlying libc FILE* implementation.
commit1947b1f646d8995d8b34e991a5115de8436e87e6
authorgregory.p.smith <gregory.p.smith@6015fed2-1504-0410-9fe1-9d1591cc4771>
Sun, 6 Apr 2008 23:11:17 +0000 (6 23:11 +0000)
committergregory.p.smith <gregory.p.smith@6015fed2-1504-0410-9fe1-9d1591cc4771>
Sun, 6 Apr 2008 23:11:17 +0000 (6 23:11 +0000)
tree9b8d8a0f2a88da2aaabc2aa4e63e98a7dac0e374
parent15c0737dcbf5e312d0fde9e5e88fb2ca18ff655f
Make file objects as thread safe as the underlying libc FILE* implementation.
close() will now raise an IOError if any operations on the file object
are currently in progress in other threads.

Most code was written by Antoine Pitrou (pitrou).  Additional testing,
documentation and test suite cleanup done by me (gregory.p.smith).

Fixes issue 815646 and 595601 (as well as many other bugs and
references to this problem dating back to the dawn of Python).

git-svn-id: http://svn.python.org/projects/python/trunk@62195 6015fed2-1504-0410-9fe1-9d1591cc4771
Doc/c-api/file.rst
Include/fileobject.h
Lib/test/test_file.py
Misc/NEWS
Objects/fileobject.c