On Sun, Nov 30, 2003 at 08:09:33PM -0600, Jay Strauss wrote:
> 
> When one uses wheel::run the processes are independent and
> asynchronous?
> 
> But when one uses sessions they are serial?

True.  Wheel::Run uses pipe/fork/exec to run programs in separate
processes.  The wheel communicates with the children through STDIN,
STDOUT and possibly STDERR.

Calling $wheel->put() sends data to the child's STDIN, and STDOUT and/or
STDERR come back as events.

It can also run subroutines the same way.

Sessions, on the other hand, are cooperatively timesliced all in one
process.

> > I would use POE::Wheel::Run to start with.  Spawn off the database
> > poller to a separate process (it's probably the only way to cooperate
> > with Class::DBI at the moment).
> 
> Can you explain, why its the only way to cooperate with Class::DBI?
> I'm currently using sessions with Class::DBI, and things seem to be
> working

While it may work, if Class::DBI blocks for any appreciable time, it
will stall the entire program.  The session using Class::DBI will take a
long timeslice, excluding other sessions (or other parts of the same
session) from running until it is done.

> Lastly, is there anyway to have async non-blocking poe without using
> Wheel::Run?

Use asynchronous, non-blocking techniques.

-- 
Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Reply via email to