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,7 +211,13 @@ namespace fc {
if( valid() )
{
cancel();
wait();
try
{
wait();
}
catch (const canceled_exception&)
{
}
}
}
@ -265,8 +271,14 @@ namespace fc {
void cancel_and_wait()
{
cancel();
wait();
cancel();
try
{
wait();
}
catch (const canceled_exception&)
{
}
}
/// @pre valid()