On Fri, May 21, 2004 at 05:31:59PM +0000, Ton Hospel wrote:
> Consider this program:
>
> #!/usr/bin/perl -w
> use strict;
> # use Event;
> use POE;
>
> pipe(local *RD, local *WR) || die "Pipe: $!";
> POE::Session->create(inline_states => {
> _start => sub {
> $poe_kernel->alias_set("foo");
> },
> add => sub {
> $poe_kernel->select_read(\*RD, "readable");
> },
> readable => sub {
> $poe_kernel->select_read(\*RD);
> },
> });
> $poe_kernel->call("foo", "add");
> close WR;
> $poe_kernel->run();
>
> I would expect that to open a pipe, set an alias, then add a readability
> watch on RD. Next the close will cause EOF for RD, so the readability will
> trigger, and the watcher is removed. Now the kernel has no more work,
> so I expect everything to clean up and exit (it should detect that the
> alias can never get triggered anymore).
>
> And this is what happens for all event cores I tested (Select, Poll and Tk)
> except when I use the Event module. Uncomment the "use Event" line and the
> program will hang in run().
>
> (POE version is 0.28_04, Event version is 1.00).
Thanks for the test program. I verified the behavior here and was
able to commit a fix for it.
-- Rocco Caputo