diff -r ffa851df0825 -r 2fb8b9db1c86 symbian-qemu-0.9.1-12/python-win32-2.6.1/lib/test/crashers/multithreaded_close.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/symbian-qemu-0.9.1-12/python-win32-2.6.1/lib/test/crashers/multithreaded_close.py Fri Jul 31 15:01:17 2009 +0100 @@ -0,0 +1,14 @@ +# f.close() is not thread-safe: calling it at the same time as another +# operation (or another close) on the same file, but done from another +# thread, causes crashes. The issue is more complicated than it seems, +# witness the discussions in: +# +# http://bugs.python.org/issue595601 +# http://bugs.python.org/issue815646 + +import thread + +while 1: + f = open("multithreaded_close.tmp", "w") + thread.start_new_thread(f.close, ()) + f.close()