in reply to Re^3: Is returning a list broken when using threads?
in thread Is returning a list broken when using threads?

Just a wild idea: could the thread routine not provide the return result for all possible contexts (scalar, array, boolean, ...) and have the join routine pick the one it needs as per its own context?

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re^5: Is returning a list broken when using threads?
by chromatic (Archbishop) on Jul 25, 2004 at 20:23 UTC

    That could be tricky, unless there were some guarantee that calling a routine in multiple contexts is idempotent.

Re^5: Is returning a list broken when using threads?
by Errto (Vicar) on Jul 25, 2004 at 20:18 UTC
    I thought that at first, but then I realized, as I mentioned above, that there's still one problem: what should wantarry return if called from within the designated subroutine?