mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
this has been fixed since 2.6 (I love removing these)
This commit is contained in:
parent
b006fcc30c
commit
d2c184605e
1 changed files with 0 additions and 14 deletions
|
@ -1,14 +0,0 @@
|
|||
# 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()
|
Loading…
Add table
Add a link
Reference in a new issue