in reply to POE session remains alive

Any session that has registered signal handlers or an alias will remain alive indefinitely. In fact, I've found it hard to make sessions go away!

Replies are listed 'Best First'.
Re^2: POE session remains alive
by spx2 (Deacon) on Aug 21, 2007 at 12:50 UTC

    Ok i've found a solution,I don't really know if it's how POE was designed to run , but reading the documentation and trying to make it work I just couldn't find any other way. I am sure that there is a "official" way or something,so if someone is kind enough please show it to me.

    use warnings; use strict; use Tk; use POE; POE::Session->create ( inline_states => { _start => sub { my ( $kernel, $session, $heap ) = @_[ KERNEL, SESSION, HEA +P ]; # # # _start does important stuff... # # $kernel->yield("some_loop"); }, some_loop => sub { $_[KERNEL]->delay("ev_count",10);#to keep session alive }, } ); $poe_kernel->run(); exit 0;
Re^2: POE session remains alive
by spx2 (Deacon) on Aug 21, 2007 at 07:38 UTC

    I've just tried setting an alias and the session still ran _stop and then I wasn't able to run post on any other state of it