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

Patches are welcome. (Appreciated even.)
  • Comment on Re^3: Is returning a list broken when using threads?

Replies are listed 'Best First'.
Re^4: Is returning a list broken when using threads?
by CountZero (Bishop) on Jul 25, 2004 at 16:24 UTC
    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

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

      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?