Ah, I wasn't aware how pervasive the POE_ASSERT_USAGE was. That can be set to trigger a die on this and many other errors. The ability to get this to warn rather than die would be nice though.
On 10/16/08, Mark Morgan <[EMAIL PROTECTED]> wrote: > It should be, it needs to be called with the appropriate session id > though, without, you'll just get it quietly ignored (a warning on this > may be a good idea, I may submit a patch for that, whilst I think of > it). :( > > ========== > #!/usr/bin/perl > > use strict; > use warnings; > > use POE; > > POE::Session->create( > inline_states => { > _start => sub { > print "starting\n"; > $_[ KERNEL ]->refcount_increment( $_[ SESSION ]->ID ); > }, > } > ); > > POE::Kernel->run; > print "done\n"; > ======== > > With the increment there, you'll never get the 'done', without it, or > with no parameter to refcount_increment, you'll get 'done' > immediately. > > Mark. > > On Tue, Oct 7, 2008 at 6:30 PM, Artem Harutyunyan <[EMAIL PROTECTED]> wrote: >>> >>> ,blah_evt => sub{ $_[KERNEL]->delay( blah_evt => 10 } >> >> OK. But why reference count trick is not working ? >> >>> >>> --- On Tue, 10/7/08, Artem Harutyunyan <[EMAIL PROTECTED]> wrote: >>> >>> From: Artem Harutyunyan <[EMAIL PROTECTED]> >>> Subject: Re: Newbie question about sessions >>> To: [EMAIL PROTECTED] >>> Cc: poe@perl.org >>> Date: Tuesday, October 7, 2008, 10:35 AM >>> >>> Hi Alex, >>> >>>> >>>> POE::Kernel->post ('worker' => 'random'); >>>> POE::Kernel->run(); >>> >>> Yes, that works. However this doesn't solve my problem. I want session >>> to stay alive and wait for (possible) future events. (I will need that >>> when I will use my class inside a server). >>> >>> Artem. >>> >> >