On Thu, 07 Sep 2017 13:33:30 -0700, nlo...@gmail.com wrote:
> The code below almost always results in "MoarVM panic: Internal error:
> Unwound entire stack and missed handler"
> ```
>     sub ran-ok() {
>         react {
>             my $proc = Proc::Async.new("echo", "1”);
>             whenever $proc.start { return 1; }
>         }
>     }
>     ran-ok()
> ```

Odd. It should really be complaining about it being a return outside of the 
dynamic scope of the routine, since the whenever block will run on a different 
thread.

I wonder if we can make this magically do what you wanted it to. I think maybe 
we can, but it's non-trivial since essentially we'd need to be having the 
return control exception caught, cause the react block to be torn down, and 
then re-throw it back on the thread that did the react. Also that would break 
the current "react is just like supply except it blocks" thing.

Reply via email to