hikyuu2/temp.py

15 lines
280 B
C++
Raw Normal View History

2020-05-01 00:36:20 +08:00
from hikyuu.interactive.interactive import *
class TTT(Task):
def __init__(self, x):
2020-05-07 00:12:56 +08:00
super(TTT, self).__init__()
2020-05-01 00:36:20 +08:00
self.x = x
2020-05-07 00:12:56 +08:00
def run(self):
2020-05-01 00:36:20 +08:00
print(self.x)
2020-05-07 00:12:56 +08:00
2020-05-01 00:36:20 +08:00
ts = []
2020-05-07 00:12:56 +08:00
tg = TaskGroup(2)
for i in range(5):
tg.addTask(TTT(i))
2020-05-01 00:36:20 +08:00
tg.join()