summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-08-28 18:54:44 (GMT)
committerGeorg Brandl <georg@python.org>2007-08-28 18:54:44 (GMT)
commitbf138333ce006c0b3bc49ddd4379312171ef2aae (patch)
tree32a9bf589ec444bd60ef9e3a994b055854193c02 /Lib/test
parentf0d1c1f3ec824f908b5e36586c12925a26d6d97b (diff)
downloadcpython-bf138333ce006c0b3bc49ddd4379312171ef2aae.zip
cpython-bf138333ce006c0b3bc49ddd4379312171ef2aae.tar.gz
cpython-bf138333ce006c0b3bc49ddd4379312171ef2aae.tar.bz2
Add a crasher for the thread-unsafety of file objects.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/crashers/file_threads.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/crashers/file_threads.py b/Lib/test/crashers/file_threads.py
new file mode 100644
index 0000000..d82ad3c
--- /dev/null
+++ b/Lib/test/crashers/file_threads.py
@@ -0,0 +1,8 @@
+# An example for http://bugs.python.org/issue815646
+
+import thread
+
+while 1:
+ f = open("/tmp/dupa", "w")
+ thread.start_new_thread(f.close, ())
+ f.close()