File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ simonlep
1919jracle
2020gandziej
2121adish
22+ LeonidCSIT
2223
2324AutoDesk Inc.
2425Cyrille Fauvel (cyrillef)
Original file line number Diff line number Diff line change @@ -1997,11 +1997,16 @@ namespace details
19971997 }
19981998 catch (...)
19991999 {
2000- // This exception could only have come from within the chore body. It should've been caught
2001- // and the task should be canceled with exception. Swallow the exception here.
2002- _ASSERTE (_HasUserException ());
2003- if (!_HasUserException ())
2004- _CancelWithException (std::current_exception ());
2000+ // The exception could have come from two places:
2001+ // 1. From the chore body, so it already should have been caught and canceled.
2002+ // In this case swallow the exception.
2003+ // 2. From trying to actually schedule the task on the scheduler.
2004+ // In this case cancel the task with the current exception, otherwise the
2005+ // task will never be signaled leading to deadlock when waiting on the task.
2006+ if (!_HasUserException ())
2007+ {
2008+ _CancelWithException (std::current_exception ());
2009+ }
20052010 }
20062011 }
20072012
You can’t perform that action at this time.
0 commit comments