in reply to Using threads with Ping
This does not work, because it will only go to the next iteration, i.e. create next child thread, when the previous one returned.foreach(@list){ $th = threads->create("ping","$_"); # $th->join; # new thread is NOT created until join # not what I want! }
foreach(@list){ push @childs, threads->create("ping","$_"); } ... foreach $child (@childs){ $child->join(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using threads with Ping
by JamesNC (Chaplain) on Jan 31, 2003 at 05:16 UTC |