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)) )
|
||||
return;
|
||||
|
||||
FC_ASSERT(std::current_exception() == std::exception_ptr(),
|
||||
"Attempting to yield while processing an exception");
|
||||
|
||||
if( !current )
|
||||
current = new fc::context(&fc::thread::current());
|
||||
|
||||
|
|
@ -698,6 +701,9 @@ namespace fc {
|
|||
if( p->ready() )
|
||||
return;
|
||||
|
||||
FC_ASSERT(std::current_exception() == std::exception_ptr(),
|
||||
"Attempting to yield while processing an exception");
|
||||
|
||||
if( timeout < time_point::now() )
|
||||
FC_THROW_EXCEPTION( timeout_exception, "" );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue