http://www.perlmonks.org?node_id=1047095


in reply to Re^2: creating unknown number of threads and then join results
in thread creating unknown number of threads and then join results

So at this point, I am thinking that spawning multiple ClearCase find commands at once is causing an issue. I'll take it up with IBM.

I concur. There is nothing in your code that could account for the symptoms you are seeing, so their source can only lie with the commands you are calling.


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.
  • Comment on Re^3: creating unknown number of threads and then join results

Replies are listed 'Best First'.
Re^4: creating unknown number of threads and then join results
by rudds_perl_habit (Novice) on Jul 30, 2013 at 18:43 UTC

    I think I stumbled onto the answer. According to this article, the chdir command is not thread-safe. See http://www.perl.com/pub/2002/06/11/threads.html. See the section about 2/3 the way down titled "Altering Perls behavior to be thread-safe, ex::threads::cwd" . They give an example of how to "fix" it, too. In my script, I use "chdir" only if running the ClearCase commands, which explains why it is failing. I'll have to re-examine how I am doing that, or implement the fix in the article above.

      "Altering Perls behavior to be thread-safe, ex::threads::cwd" .

      Ah! That's a situation I've never encountered because Windows has an inherent notion of per-thread cwd.

      That is, chdir is threadsafe on windows where I do all my programming.


      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.