On Thu Jan 01 02:33:18 2015, DBOOK wrote:
Show quoted text> POE::Kernel creates a session when initialized, which means its
> session count will always be at least 1 when checked in run() ($self-
> >_data_ses_count() == 0) which causes it to run the loop. With
> POE::Loop::EV the automatic signal handler is handled by EV so the
> loop waits indefinitely. Don't know if that should be changed to check
> <= 1 or if another method should be used to check (external) session
> count.
There should probably be a flag on internal sessions that allow
them not to count. I think the same sort of thing for events
might be an improvement over _idle_queue_grow() and its related
functions.
I think the assertion in question is useful. It prevented "POE"
from crashing in an identified edge case, and it told developers
they had tried a silly thing.
While it's currently impossible for the assertion to trigger,
changes at a distance and by uncoordinated developers could
make it relevant again. Runtime overhead is negligible, and
it has reduced (and may again reduce) development overhead.
I've commented the code to refer back to this ticket, but I
have no intent to remove the check at this time.