Skip to content

Commit 4e6cb42

Browse files
committed
Removing an incorrect assert in pplxtasks, that should have been removed with the pull request. Updating the contributors file as well.
1 parent 2bd1fed commit 4e6cb42

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

CONTRIBUTORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ simonlep
1919
jracle
2020
gandziej
2121
adish
22+
LeonidCSIT
2223

2324
AutoDesk Inc.
2425
Cyrille Fauvel (cyrillef)

Release/include/pplx/pplxtasks.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)