ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 概述 ``` go(function (){ $csp = new \EasySwoole\Component\Csp(); $csp->add('t1',function (){ \co::sleep(0.1); return 't1 result'; }); $csp->add('t2',function (){ \co::sleep(0.1); return 't2 result'; }); var_export($csp->exec(5)); /** * array ( 't1' => 't1 result', 't2' => 't2 result', ) */ }); ```