You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Andrew Chung (JIRA)" <ji...@apache.org> on 2016/05/02 20:41:12 UTC

[jira] [Created] (REEF-1377) Move from C# Tasks to Threads to run user's Task

Andrew Chung created REEF-1377:
----------------------------------

             Summary: Move from C# Tasks to Threads to run user's Task
                 Key: REEF-1377
                 URL: https://issues.apache.org/jira/browse/REEF-1377
             Project: REEF
          Issue Type: Bug
          Components: REEF.NET Evaluator
            Reporter: Andrew Chung
            Assignee: Andrew Chung


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)