Commit 3869207a authored by Pavel Vainerman's avatar Pavel Vainerman

(CommonEvetLoop): check futer.valid()

parent 9fd0ec77
...@@ -65,9 +65,6 @@ namespace uniset ...@@ -65,9 +65,6 @@ namespace uniset
bool ret = true; bool ret = true;
if( !evprep.is_active() )
evprep.start();
// посылаем сигнал для обработки // посылаем сигнал для обработки
evprep.send(); // будим default loop evprep.send(); // будим default loop
...@@ -83,10 +80,13 @@ namespace uniset ...@@ -83,10 +80,13 @@ namespace uniset
if( status == future_status::ready ) if( status == future_status::ready )
{ {
if( result.valid() )
{
ret = result.get(); ret = result.get();
break; break;
} }
} }
}
return ret; return ret;
} }
...@@ -201,7 +201,8 @@ namespace uniset ...@@ -201,7 +201,8 @@ namespace uniset
while( !wactlist.empty() ) while( !wactlist.empty() )
{ {
auto&& winf = wactlist.front(); auto winf = wactlist.front();
wactlist.pop();
try try
{ {
...@@ -213,8 +214,6 @@ namespace uniset ...@@ -213,8 +214,6 @@ namespace uniset
cerr << "(CommonEventLoop::onPrepare): evprepare err: " << ex.what() << endl; cerr << "(CommonEventLoop::onPrepare): evprepare err: " << ex.what() << endl;
winf.result.set_value(false); winf.result.set_value(false);
} }
wactlist.pop();
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment