Skip to content

Commit 866fe37

Browse files
authored
Correct unobserved Task exception behavior doc
The doc described .NET 4.0 behavior only without stating how on .NET 4.5+ the behavior changed.
1 parent 8babbd8 commit 866fe37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Threading.Tasks/Task.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2599,7 +2599,7 @@ Task t Status: RanToCompletion, Result: 42
25992599
<format type="text/markdown"><![CDATA[
26002600
26012601
## Remarks
2602-
Tasks that throw unhandled exceptions store the resulting exception and propagate it wrapped in a <xref:System.AggregateException> in calls to <xref:System.Threading.Tasks.Task.Wait%2A> or in accesses to the <xref:System.Threading.Tasks.Task.Exception%2A> property. Any exceptions not observed by the time the task instance is garbage collected will be propagated on the finalizer thread. For more information and an example, see [Exception Handling (Task Parallel Library)](~/docs/standard/parallel-programming/exception-handling-task-parallel-library.md).
2602+
Tasks that throw unhandled exceptions store the resulting exception and propagate it wrapped in a <xref:System.AggregateException> in calls to <xref:System.Threading.Tasks.Task.Wait%2A> or in accesses to the <xref:System.Threading.Tasks.Task.Exception%2A> property. On .NET 4.0, any exceptions not observed by the time the task instance is garbage collected will be propagated on the finalizer thread, which crashes the process. On .NET 4.5 and later, unobserved exceptions are not rethrown from the Finalizer. For more information and an example, see [Exception Handling (Task Parallel Library)](~/docs/standard/parallel-programming/exception-handling-task-parallel-library.md).
26032603
26042604
]]></format>
26052605
</remarks>

0 commit comments

Comments
 (0)