File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
hikyuu_cpp/hikyuu/analysis Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,9 @@ vector<CombinateAnalysisOutput> HKU_API combinateIndicatorAnalysisWithBlock(
7575 size_t total = stocks.size ();
7676 HKU_IF_RETURN (total == 0 , result);
7777
78- auto work_num = std::thread::hardware_concurrency ();
79- ThreadPool tg (work_num);
78+ // auto work_num = std::thread::hardware_concurrency();
79+ // ThreadPool tg(work_num);
80+ auto * tg = get_global_task_group ();
8081 vector<std::future<vector<CombinateAnalysisOutput>>> tasks;
8182
8283 vector<Stock> buf;
@@ -86,8 +87,8 @@ vector<CombinateAnalysisOutput> HKU_API combinateIndicatorAnalysisWithBlock(
8687 for (size_t i = range.first ; i < range.second ; i++) {
8788 buf.emplace_back (stocks[i]);
8889 }
89- tasks.emplace_back (tg. submit ([sgs, stks = std::move (buf), n_query = query,
90- n_tm = tm->clone (), n_sys = sys->clone ()]() {
90+ tasks.emplace_back (tg-> submit ([sgs, stks = std::move (buf), n_query = query,
91+ n_tm = tm->clone (), n_sys = sys->clone ()]() {
9192 vector<CombinateAnalysisOutput> ret;
9293 Performance per;
9394 CombinateAnalysisOutput out;
You can’t perform that action at this time.
0 commit comments