| 31 | return 0; |
| 32 | } |
| 33 | static 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 | } |
| 47 | int main( int argc,char *argv[] ) |
| 48 | { |
| 49 | vector< stCoClosure_t* > v; |