Exception Propagation in Parallel Task Objects

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Exception handling in parallel systems is complex due to the challenges of propagating exceptions from tasks that are not joined with, leading to potential loss of critical error information and increased complexity in stack unwinding and debugging.

Innovation Solution

A method involving the creation of a task object that determines whether an exception is likely to be observed, with a monitoring object re-throwing the exception if not, and utilizing a finalization method to propagate exceptions during garbage collection, along with aggregation and handling of exceptions through a coordination task, ensures that exceptions are properly propagated and handled even for fire-and-forget tasks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If exceptions are caught and stored in task objects without re-throwing, then parallel execution efficiency is improved, but exception information may be lost

Engineering Contradiction:
Improveparallel execution efficiencyVSAvoidexception information
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The system performs preliminary actions by creating a monitoring object that proactively tracks task object accessibility before exceptions are lost. The monitoring object establishes a watch mechanism that detects when task objects become inaccessible, enabling preemptive exception propagation before information loss occurs.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback through the monitoring object that continuously observes task object state and provides information about accessibility. This feedback mechanism enables the system to detect when task objects are about to become inaccessible and trigger appropriate exception handling actions.

Inventive Principle:
Principle #23Feedback

2Loss of information

If all exceptions are re-thrown immediately, then exception information is preserved, but system complexity increases

Engineering Contradiction:
Improveexception informationVSAvoidexception handling complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The system applies local quality by making exception handling behavior context-dependent. The monitoring object evaluates local conditions (task object accessibility, observer presence) to determine whether to propagate exceptions. This selective approach handles exceptions differently based on local system state rather than applying a uniform rule.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The monitoring object serves as an intermediary between task objects and exception handling mechanisms. It mediates exception propagation by intercepting exceptions, evaluating whether task objects are accessible, and决定是否 re-throwing. This intermediary layer simplifies the overall system by centralizing the decision logic in one component.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Loss of energy

If task objects are allowed to become inaccessible, then memory management is improved, but exceptions cannot be observed

Engineering Contradiction:
Improvememory usageVSAvoidexception observability
Core Design Contradiction:
Loss of energyVSLoss of information

Solution Approach 1:

The system performs preliminary action by establishing a finalization method that executes before task objects are fully garbage collected. This finalization method provides a last opportunity to propagate exceptions before memory is reclaimed, ensuring exception information is preserved even when task objects become inaccessible to normal observation mechanisms.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8359604B2Propagating unobserved exceptions in a parallel system
Publication Date: 2013.01.22 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8359604B2 patent drawing
  • US8359604B2 patent drawing
  • US8359604B2 patent drawing

AI summary

A method of handling an exception in a parallel system includes constructing a task object, executing a method with the task object, and catching an exception with the task object during execution of the method. The exception is propagated in response to the task object becoming inaccessible without the exception having been observed.