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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.15
    • REEF.NET Evaluator
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: