예제 #1
0
int main()
{
	/* Initialize the fiber library */
	initFibers();
	
	/* Go fibers! */
	spawnFiber( &fiber1 );
	spawnFiber( &fibonacchi );
	spawnFiber( &squares );

	/* Since these are nonpre-emptive, we must allow them to run */
	waitForAllFibers();
	
	/* The program quits */
	return 0;
}
예제 #2
0
ctr_object* ctr_fiber_join_all(ctr_object* myself, ctr_argument* argumentList) {
  return ctr_build_bool(waitForAllFibers());
}