in reply to Re^3: parallel process on remote machines,read results and hanle timeout of those process
in thread parallel process on remote machines,read results and hanle timeout of those process

Thanks for your patient. It is really nice of the perl expets here to answer questions.

Yah, my platform is Linux. Some questions about nfreeze/ Storable

Here is a perl code to bring back the results to the main program.
my $results_serialized = nfreeze \%testresults; print $serialized;

1. What is the advantage of persistent data structure? all data in the same block of memory,fast speed? It is suitable for what kind of needs?
2. If not use nfreeze, I mean, just use

return \%testresults
It is also working?

  • Comment on Re^4: parallel process on remote machines,read results and hanle timeout of those process
  • Select or Download Code

Replies are listed 'Best First'.
Re^5: parallel process on remote machines,read results and hanle timeout of those process
by BrowserUk (Patriarch) on Oct 31, 2014 at 15:56 UTC
    1. What is the advantage of persistent data structure? all data in the same block of memory,fast speed? It is suitable for what kind of needs?

    2. If not use nfreeze, I mean, just use

    It is quite hard to answer those questions without seeing their actual use in context.

    On the face of it, it doesn't make a lot of sense to freeze a hash in order to return it from a subroutine.

    The only possible (tentative) clue I can glean from the snippet you've posted comes from the name %testresults. It is possible that the code goes on to compare those results with a pre-frozen, known good results hash; in which case the author might be relying upon doing a binary compare of the frozen hashes rather than having to do a looping, possibly recursive traversal to compare them. If so, it might be cleverly efficient; or just obscurely dangerous.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Hello BrowserUK,
      I ask another question about sysread/non-blocking filehandle, but I have not find the right answer yet.
      http://perlmonks.org/index.pl?node_id=1106019
      If you have time, could you have a look of my code in the thread above? Thanks!