Scheduler should handle 'pathological events' appropriately
We need a way to appropriately handle 'pathological' events in the new functional framework.
To quote @graven from an email thread :-
"The bigger problem is the ‘exceptional’ case, where eg. decoding algorithms run into ’this should never happen’ type of problems, such as data corruption. Basically things where one would naturally throw exceptions. In that case, these should ‘bubble up’ into the scheduler, and it should ‘catch’ them instead of effectively crashing. The fact that we actually run (re-entrant) tasks on separate threads actually implies that we can ’shut down’ things while still reasonably sure that the rest of the system is still in a good state. Hence when this happens, the scheduler can actually ’take action’ on something like this happening, and we should discuss how we can configure the scheduler to ’take alternate action’ (such as run a ’task of last resort’ which flushes the event into a separate stream) in case of these type of problem."