in reply to POE yield not working
The reason the first call works is that you're passing parameters in your yield() call.
... $kernel->yield('keepalive', $io_wheel, $kernel); ....
The keepalive callback collects those parameters here:
... keepalive => sub { my ( $io_wheel, $kernel ) = @_[ ARG0, ARG1 ]; ....
The problem is that you're not continuing to pass those parameters in the delay. This might work better:
keepalive => sub { my ( $io_wheel, $kernel ) = @_[ ARG0, KERNEL ]; $io_wheel->put( "keepalive" ); $kernel->delay( 'keepalive' => 10, $io_wheel ); },
Notes:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: POE yield not working
by SoulStyle (Initiate) on Feb 03, 2013 at 16:52 UTC | |
by rcaputo (Chaplain) on Feb 10, 2013 at 15:09 UTC | |
by rcaputo (Chaplain) on Feb 10, 2013 at 15:02 UTC |