Am I just being too sarcastic to see the value in spawning of a bunch of threads that just do a backtick operation? Don't get me wrong, I see the general value in the question and answers about thread spawning and joining but would this be a proper monks node without someone questioning the given script. Is there something funky about perl on Win32 that I'm missing (like backticks don't fork/exec). Or more general, is there any value in spawing threads that will just fork/exec a cmd.
My first inclination is that no, there is no value in that. You should either junk the thread overhead and just stick with fork/exec (and not use backticks because there's overhead in that with a shell coming into the equation) or find some "thread-safe/thread-aware" way to ping (is Net::Ping thread-safe?).
However, if this is just an exercise in threading and is not going to be used in the real world - then nevermind.
-derby
In reply to Re: Using threads with Ping
by derby
in thread Using threads with Ping
by JamesNC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |