试试folly里面的executor+future,或者boost里面的thread pool。或者直接用标准库的async+future。
【 在 capriccio 的大作中提到: 】
: 伪代码如下:
:
: myfun()
: {
: mytype a,b,c,d;
: getData(a,b);//从数据采集程序的缓存中读取a、b
: funA(a,c);//传递a、c的引用,a作为输入,c作为返回值
: funB(b,d);//同上
: funC
: ..................
发自「今日水木 on iPhone XR」
--
FROM 114.253.34.*