Theres a cool thing about wikis, anyone can add to it.

David

On Fri, 03 Dec 2004 15:55:09 -0500 (EST), [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> 
> 
> 
> On 03-Dec-2004 Rocco Caputo wrote:
> > On Thu, Dec 02, 2004 at 05:35:40PM -0800, Ofer Nave wrote:
> >>
> >> 2) Reading over the POE::Kernel docs, I noticed all the alarm and delay
> >> functions take an event name, but not a session id.  Is there never a
> >> situation where you'd want to set an alarm that would send an event to
> >> a session other than yours?
> > Making the task easier should be done as an abstraction outside
> > POE::Kernel rather than by wedging another timer method into it.
> 
> This could go in the cookbook :
> 
> my $o_session='alias';
> my $o_event='event';
> my @payload=(1..10);
> 
> my $t_event_name="deplayed-postback-".$n++;
> $poe_kernel->state($t_event_name=>sub {
>         $poe_kernel->post($o_session, $o_event, @payload);
>         $poe_kernel->state($t_event_name);
>     });
> 
> $poe_kernel->delay_set($t_event, 10);
> 
> -Philip
> 
>

Reply via email to