<?xml version="1.0" encoding="windows-1252"?>
<node id="156507" title="Running subroutines asynchronously" created="2002-04-03 19:24:17" updated="2005-08-15 11:32:14">
<type id="1857">
categorized question</type>
<author id="11732">
QandAEditors</author>
<data>
<field name="doctext">
Is there a way to run a sub-routine in a non-linear fashion?  For example, I need to ping to 100 ip's to check the connectivity of my entire system.  &lt;br&gt;&lt;br&gt;

(linear method) I currently ping each ip individually "one at a time" and wait for the entire list to complete.  This can take a while if I set a 2 second timeout on the ping. &lt;br&gt;&lt;br&gt;

(non-linear method) What I would rather do is use a subroutine to ping each ip "in the background (in unix: a command followed by a '&amp;')" and then wait until each of the ping subroutines reports back (or an appropriate amount of time) and compile the results.</field>
<field name="parent_node">
1833</field>
</data>
</node>
