Allow `return` in `@parallel`?



I recently ran into some unexpected behavior with the @parrallel operator that I think might warrant a syntax change. In particular, since @parallel requires specification of a reduction function for value returned by each parallel run, I assumed I should be working with the @parallel call similar to how I would treat a function, and included a return statement. But turns out, julia sees @parallel as a loop, and so the return statement caused it to exit the @parallel, causing some very hard to figure out errors.

Might I suggest allowing @parallel accept return statements? It’s implicitly using return values from every pass of the loop, seems like it should allow them to be declared explicitly.