mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Add a crasher for the thread-unsafety of file objects.
This commit is contained in:
parent
f0d1c1f3ec
commit
bf138333ce
1 changed files with 8 additions and 0 deletions
8
Lib/test/crashers/file_threads.py
Normal file
8
Lib/test/crashers/file_threads.py
Normal file
|
|
@ -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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue