I am curious as to why doing this through a wheel::run is not something you
want to do.

I am sure you have an excellent reason, I just want to know what it is so I
can get a better understanding of how people use POE since I am relatively
new.



On 8/29/06, David Narayan <[EMAIL PROTECTED]> wrote:

On 8/29/06, Philip Gwyn <[EMAIL PROTECTED]> wrote:
>
> On 29-Aug-2006 David Narayan wrote:
> > Is there a way to increase the number of child processes that
> > PoCo::Generic forks off? I have done something similar with
> > POE::Wheel::Run and Net::SSH::Perl (see code snippet) but would like
> > to use PoCo::Generic instead of POE::Wheel::Run directly.
>
> Each PoCo::Generic handles exactly one object.  If you want more child
> processes, create more PoCo::Generic instances.
>
> Or am I missing something?
>

At a high level, I am trying to connect to many hosts and run the same
command in a non-blocking fashion. The caveat is that not only are
connections non-blocking, but some X number of them are simultaneous.

Since the point of the application is essentially to do the same thing
on many hosts, I was hoping to just create a single PoCo::Generic
object and have some number of children (of the same object) be used
for the simultaneous bits.  It seemed like overkill to have to
recreate essentially the same object over and over.

In my prior attempt (without PoCo::Generic), I just launched some X
number of POE::Wheel::Run processes from within one event of the
session.

In this attempt (with PoCo::Generic), I already have the generic
object and was hoping to do something similar in one event of the
session.

This is kind of what I'm thinking (I've left out error states and some
cleanup states, but this is the basic idea).

_start  (init stuff)  --> _exec ( go run something on the host )  -->
_result --> (back to _exec until no more hosts) --> _stop

It is at the _exec state that I wanted to launch a number of children
to process things simultaneously.

Did that make any more sense ?

Thanks,
-David

Reply via email to