adding extra checks for yielding while processing a catch
This commit is contained in:
parent
83a9e4d7c8
commit
6872112ab0
1 changed files with 6 additions and 0 deletions
|
|
@ -665,6 +665,9 @@ namespace fc {
|
||||||
if( tp <= (time_point::now()+fc::microseconds(10000)) )
|
if( tp <= (time_point::now()+fc::microseconds(10000)) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
FC_ASSERT(std::current_exception() == std::exception_ptr(),
|
||||||
|
"Attempting to yield while processing an exception");
|
||||||
|
|
||||||
if( !current )
|
if( !current )
|
||||||
current = new fc::context(&fc::thread::current());
|
current = new fc::context(&fc::thread::current());
|
||||||
|
|
||||||
|
|
@ -698,6 +701,9 @@ namespace fc {
|
||||||
if( p->ready() )
|
if( p->ready() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
FC_ASSERT(std::current_exception() == std::exception_ptr(),
|
||||||
|
"Attempting to yield while processing an exception");
|
||||||
|
|
||||||
if( timeout < time_point::now() )
|
if( timeout < time_point::now() )
|
||||||
FC_THROW_EXCEPTION( timeout_exception, "" );
|
FC_THROW_EXCEPTION( timeout_exception, "" );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue