Uploaded image for project: 'REEF'
  1. REEF
  2. REEF-1377

Move from C# Tasks to Threads to run user's Task

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.15
    • Component/s: REEF.NET Evaluator
    • Labels:
      None

      Description

      We should use Thread instead of Task to run user's REEF Task to simplify Exception handling. The main motivation to move is the following use-case:

      On an unhandled Exception on the REEF system side, we would like to fail the Evaluator and have it relay a message back to the Driver. For this purpose, we will bind a handler for AppDomain.CurrentDomain.UnhandledException. However, this does not work for Tasks. The Task equivalent, TaskScheduler.UnobservedTaskException, only triggers when a Task gets GC'd, which may be a long time after a Task fails unless GC is forced. In addition, Tasks do not crash a process in C# 4.5, so if an Unhandled Exception is not observed on our part, there is a possibility that it remains unobserved for a long time which may cause system state to become corrupted and unstable.

      We should thus switch to use Thread to simplify the Exception handling in the REEF.NET Evaluator.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                afchung90 Andrew Chung
                Reporter:
                afchung90 Andrew Chung
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: