void Client::init( ) {
	init_mgrs( );

	thread_mgr.post_init( );

	#if defined( GL_DEBUG ) || defined( _DEBUG )
	system( "PAUSE" );
	#endif

	thread_main_loop( );
}
Ejemplo n.º 2
0
void thread_pool_start(struct thread_pool *pool)
{
	if (pool->count == 1) {
		assert(pool->threads[0]);
		thread_main_loop(pool->threads[0]);
	}
	else if (pool->count > 1) {
		barrier_wait(&pool->thread_sync);
		thread_pool_wait(pool);
	}
	else {
		error("no thread to run");
	}
}