[pypy-issue] [issue799] Strange exception with threads

Alex Gaynor tracker at bugs.pypy.org
Tue Jul 19 20:22:35 CEST 2011


New submission from Alex Gaynor <alex.gaynor at gmail.com>:

Now that the deadlock is fixed, there is now a rather strange exception which is 
non-deterministically produced (I've even seen the script exit successfully), 
the code:


import gc
import threading


def get_results():
    pass

def main():
    i = 0
    while i < 5000000:
        t = threading.Thread(target=get_results)
        t.start()
        t.join()
        i += 1
        if i % 1000 == 0:
            print i

main()


and the produced exception::


  File "app_main.py", line 53, in run_toplevel
  File "t.py", line 18, in <module>
    main()
  File "t.py", line 13, in main
    t.join()
  File "/home/alex/projects/pypy/lib-python/2.7/threading.py", line 630, in join
    if not self.__started.is_set():
AttributeError: 'int' object has no attribute 'is_set'
Exception AttributeError: "'int' object has no attribute 'is_set'" in 
threading._shutdown() ignored

----------
messages: 2825
nosy: agaynor, pypy-issue
priority: bug
status: unread
title: Strange exception with threads

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue799>
________________________________________


More information about the pypy-issue mailing list