PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/python/director_thread_runme.py

#
Python | 18 lines | 12 code | 6 blank | 0 comment | 1 complexity | 03dab3b801d28ae7010685f3db0df272 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. from director_thread import Foo
  2. class Derived(Foo) :
  3. def __init__(self):
  4. Foo.__init__(self)
  5. def do_foo(self):
  6. self.val = self.val - 1
  7. d = Derived()
  8. d.run()
  9. if d.val >= 0:
  10. print d.val
  11. raise RuntimeError
  12. d.stop()