[issue815646] thread unsafe file objects cause crash

Antoine Pitrou report at bugs.python.org
Thu Mar 27 12:00:09 CET 2008


Antoine Pitrou <pitrou at free.fr> added the comment:

A small addition to Christian's code snippet allows me to reproduce the
problem as well:

import thread

f=open("tmp1", "w")

def worker():
    global f
    while 1:
        f.close()
        f = open("tmp1", "w")
        f.seek(0,0) 

thread.start_new_thread(worker, ())
thread.start_new_thread(worker, ())

while 1:
    pass

----------
nosy: +pitrou

____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue815646>
____________________________________


More information about the Python-bugs-list mailing list