void _entry_point() { while( _actorStarted ) { _actorQueue.wait(); if( !_actorStarted ) continue; std::pair<COMMAND,std::promise<RETURN_VALUE>> item = _actorQueue.pop_back(); item.second.set_value( process( item.first ) ); } }