session_thread_control* stc_ptr_register_accept;
{
rw_scoped_lock pool_lk( pool_sessions_mutex );
- stc_ptr_register_accept = pool_sessions.pop();
+ stc_ptr_register_accept = pool_sessions.front();
+ pool_sessions.erase( pool_sessions.begin() );
}
//session add wait_sessions
return;
}
session_thread_control* p_stc = new session_thread_control( sess, vsnic_cpumask, rsnic_cpumask, param_data.schedule_algorithm );
- pool_sessions.push( p_stc );
+ pool_sessions.push_back( p_stc );
}
catch( std::bad_alloc ex ){
Logger::putLogFatal(
session_thread_control* stc = itr->second;
waiting_sessions.erase( itr );
rw_scoped_lock lk2( pool_sessions_mutex );
- pool_sessions.push( stc );
+ pool_sessions.push_back( stc );
}
//release sessions[i]->join();
while( !pool_sessions.empty() ){
rw_scoped_lock lk( pool_sessions_mutex );
- session_thread_control* stc = pool_sessions.pop();
- stc->join();
+ pool_sessions.front()->join();
{
- boost::mutex::scoped_lock upthread_wait( stc->get_upthread_mutex() );
- boost::mutex::scoped_lock downthread_wait( stc->get_downthread_mutex() );
+ boost::mutex::scoped_lock upthread_wait( pool_sessions.front()->get_upthread_mutex() );
+ boost::mutex::scoped_lock downthread_wait( pool_sessions.front()->get_downthread_mutex() );
}
+ session_thread_control* stc = pool_sessions.front();
+ pool_sessions.erase( pool_sessions.begin() );
delete stc;
stc = NULL;
if( unlikely( LOG_LV_DEBUG == Logger::getLogLevel( LOG_CAT_L7VSD_VIRTUALSERVICE ) ) ){
return;
}
//regist accept event handler
- stc_ptr = pool_sessions.pop();
+ stc_ptr = pool_sessions.front();
+ pool_sessions.erase( pool_sessions.begin() );
rw_scoped_lock waiting_pool_lock( waiting_sessions_mutex );
waiting_sessions.insert( std::make_pair( stc_ptr->get_upthread_id(), stc_ptr ) );
}
active_sessions.erase( itr );
rw_scoped_lock pool_lk( pool_sessions_mutex );
stc_ptr->get_session()->initialize();
- pool_sessions.push( stc_ptr );
+ pool_sessions.push_back( stc_ptr );
{
rw_scoped_lock sorrys_lk( sorry_sessions_mutex );