awips2/nativeLib/rary.cots.jepp/jepp-2.3/threadtest.py
root 06a8b51d6d Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 64fa9254b946eae7e61bbc3f513b7c3696c4f54f
2012-01-06 08:55:05 -06:00

25 lines
536 B
Python
Executable file

from jep import *
import threading
System = findClass('java.lang.System')
class Test(threading.Thread):
pre = None
def __init__(self, pre):
threading.Thread.__init__(self)
self.pre = str(pre)
def run(self):
print 'printing:', self.pre
System.out.println(self.pre)
print '2nd printing:', self.pre
System2 = findClass('java.lang.System')
System2.out.println(self.pre)
if(__name__ == '__main__'):
for i in range(100):
t = Test(i)
t.start()