in reply to Re^2: Confusion with POE & pTk (not yet unconfused)
in thread Confusion with POE & pTk
That's a good analysis, Craig.
The second session, "Display" if I'm not lost, doesn't have any POEy things going on. The only reason it sticks around at all is because its alias implies that another session might send it events.
Likewise, you might think the "myClient" alias should keep the FollowTail session alive even when there's nothing POEy going on in that session.
In most cases that's true, but there's an exception: POE sessions will be terminated if every active session is waiting for an event from some other session. In POE terms, when all remaining sessions are kept alive only by an alias, then none of them will wake up to send an event. POE::Kernel recognizes this deadlock and signals the remaining sessions that they're idle. It literally sends a fake SIGIDLE signal to every session.
If no session wakes up after SIGIDLE is broadcast, then POE::Kernel broadcasts one more fake signal, SIGZOMBIE. This kills off the sessions, and POE::Kernel->run() exits normally.
If you export POE_TRACE_EVENTS=1 or export POE_TRACE_SIGNALS=1, you should see this happen.
|
|---|