MCPcopy Create free account
hub / github.com/Tencent/libco / batch_exec

Function batch_exec

example_closure.cpp:33–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 return 0;
32}
33static void batch_exec( vector<stCoClosure_t*> &v )
34{
35 vector<pthread_t> ths;
36 for( size_t i=0;i<v.size();i++ )
37 {
38 pthread_t tid;
39 pthread_create( &tid,0,thread_func,v[i] );
40 ths.push_back( tid );
41 }
42 for( size_t i=0;i<v.size();i++ )
43 {
44 pthread_join( ths[i],0 );
45 }
46}
47int main( int argc,char *argv[] )
48{
49 vector< stCoClosure_t* > v;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected