void Thread::_runChild() { setName( className( this )); pinCurrentThread(); _impl->id._impl->pthread = pthread_self(); if( !init( )) { LBWARN << "Thread " << className( this ) << " failed to initialize" << std::endl; _impl->state = STATE_STOPPED; pthread_exit( 0 ); LBUNREACHABLE; } _impl->state = STATE_RUNNING; LBINFO << "Thread " << className( this ) << " successfully initialized" << std::endl; run(); LBINFO << "Thread " << className( this ) << " finished" << std::endl; this->exit(); LBUNREACHABLE; }
void Thread::_runChild() { setName( boost::lexical_cast< std::string >( _impl->index )); pinCurrentThread(); _impl->id._impl->pthread = pthread_self(); if( !init( )) { LBWARN << "Thread " << className( this ) << " failed to initialize" << std::endl; _impl->state = STATE_STOPPED; pthread_exit( 0 ); LBUNREACHABLE; } _impl->state = STATE_RUNNING; LBINFO << "Thread #" << _impl->index << " type " << className( *this ) << " successfully initialized" << std::endl; run(); LBVERB << "Thread " << className( this ) << " finished" << std::endl; this->exit(); LBUNREACHABLE; }