Advertisement
snake5

SGScript - parallel processing | the beginning

Jun 2nd, 2013
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. include_shared( "sgspproc" );
  2.  
  3. PPROC = pproc_create();
  4.  
  5. job = PPROC.add_job( "for(i=0;i<10;++i){ print( 'thread   T W O\n' ); sleep( 20 ); }" );
  6.  
  7. job.start();
  8. for( i = 0; i < 10; ++i )
  9. {
  10.     print( 'thread  O N E\n' );
  11.     sleep( 20 );
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement