Exemplo n.º 1
0
 def test_killing_unlinked(self):
     e = coros.event()
     def func():
         try:
             1/0
         except:
             e.send_exception(*sys.exc_info())
     p = proc.spawn_link(func)
     try:
         try:
             e.wait()
         except ZeroDivisionError:
             pass
     finally:
         p.unlink() # this disables LinkedCompleted that otherwise would be raised by the next line
     sleep(DELAY)
Exemplo n.º 2
0
 def test_killing_unlinked(self):
     e = _event.Event()
     def func():
         try:
             raise ExpectedError('test_killing_unlinked')
         except:
             e.send_exception(*sys.exc_info())
     p = proc.spawn_link(func)
     try:
         try:
             e.wait()
         except ExpectedError:
             pass
     finally:
         p.unlink() # this disables LinkedCompleted that otherwise would be raised by the next line
     sleep(DELAY)
Exemplo n.º 3
0
 def test_killing_unlinked(self):
     e = _event.Event()
     def func():
         try:
             raise ExpectedError('test_killing_unlinked')
         except:
             e.send_exception(*sys.exc_info())
     p = proc.spawn_link(func)
     try:
         try:
             e.wait()
         except ExpectedError:
             pass
     finally:
         p.unlink() # this disables LinkedCompleted that otherwise would be raised by the next line
     sleep(DELAY)