The state machine approach seems the cleanest. Anything else is just going to be an obfuscated state machine anyway. Might as well make it explicit.

> On Feb 7, 2014, at 11:41 PM, Jameson Nash <notifications@github.com> wrote:
> 
> In src/task.c:
> 
> > @@ -736,21 +730,15 @@ void NORETURN throw_internal(jl_value_t *e)
> >          jl_longjmp(jl_current_task->eh->eh_ctx, 1);
> >      }
> >      else {
> > +        JL_PRINTF(JL_STDERR, "fatal: error thrown and no exception handler available.\n");
> well, jl_task_t* still has lots of free bits (and a free byte), so we could stick a flag task.failed or make it stateful: task.status = [UNSTARTED, RUNNABLE, NOTRUNNABLE, DONE, FAILED]
> 
> —
> Reply to this email directly or view it on GitHub.