Make future's cancel_and_wait automatically swallow the canceled_exception since it is expected.

This commit is contained in:
Eric Frias 2014-07-26 14:51:48 -04:00
parent c208a968b2
commit 24ba357b0d

View file

@ -211,8 +211,14 @@ namespace fc {
if( valid() )
{
cancel();
try
{
wait();
}
catch (const canceled_exception&)
{
}
}
}
/**
@ -266,8 +272,14 @@ namespace fc {
void cancel_and_wait()
{
cancel();
try
{
wait();
}
catch (const canceled_exception&)
{
}
}
/// @pre valid()
bool ready()const { return m_prom->ready(); }