예제 #1
0
 def subthread():
     try:
         time.sleep(0.5)
         with __pypy__.thread.signals_enabled:
             thread.interrupt_main()
     except BaseException, e:
         interrupted.append(e)
예제 #2
0
 def subthread():
     try:
         time.sleep(0.5)
         with __pypy__.thread.signals_enabled:
             thread.interrupt_main()
     except BaseException, e:
         interrupted.append(e)
예제 #3
0
파일: test_signal.py 프로젝트: charred/pypy
 def subthread():
     try:
         with __pypy__.thread.signals_enabled:
             thread.interrupt_main()
             for i in range(10):
                 print 'x'
                 time.sleep(0.1)
     except BaseException, e:
         interrupted.append(e)
예제 #4
0
 def subthread():
     print('subthread started')
     try:
         with __pypy__.thread.signals_enabled:
             thread.interrupt_main()
             for i in range(10):
                 print('x')
                 time.sleep(0.25)
     except BaseException, e:
         interrupted.append(e)
예제 #5
0
 def subthread():
     print('subthread started')
     try:
         with __pypy__.thread.signals_enabled:
             thread.interrupt_main()
             for i in range(10):
                 print('x')
                 time.sleep(0.25)
     except BaseException as e:
         interrupted.append(e)
     finally:
         print('subthread stops, interrupted=%r' % (interrupted,))
         done.append(None)
예제 #6
0
 def subthread():
     print('subthread started')
     try:
         with __pypy__.thread.signals_enabled:
             thread.interrupt_main()
             for i in range(10):
                 print('x')
                 time.sleep(0.25)
     except BaseException as e:
         interrupted.append(e)
     finally:
         print('subthread stops, interrupted=%r' % (interrupted, ))
         done.append(None)