Hi,

My application hangs on exit.
I have isoleted this piece of code that reproduces the error: (the time module is extra and not needed to reproduce)

import threading
import time

def func():
    b = threading.Semaphore(value=0)
    b.acquire()

a = threading.Thread(target=func)
a.start()

time.sleep(2)
quit()

When SystemExit is raised, nothing happens. Python hangs.

pdb does seem to have problem with this code too:
 pdb smth.py
...
(Pdb) Traceback (most recent call last):
  File "/usr/bin/pdb", line 1319, in <module>
    pdb.main()
  File "/usr/lib/python2.6/pdb.py", line 1312, in main
    pdb.interaction(None, t)
  File "/usr/lib/python2.6/pdb.py", line 198, in interaction
    self.cmdloop()
  File "/usr/lib/python2.6/cmd.py", line 130, in cmdloop
    line = raw_input(self.prompt)
ValueError: I/O operation on closed file

Any help would be appreciated,
Lyudmil
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to