AnyEvent
view release on metacpan or search on metacpan
lib/AnyEvent/Impl/POE.pm view on Meta::CPAN
Of course, without the workaround, POE also prints ugly messages again
that say the program *might* be buggy.
While this is not good to performance, at least regarding speed, with a
modern Linux kernel, the overhead is actually quite small.
=item Timing deficiencies
POE manages to not have a function that returns the current time. This is
extremely problematic, as POE can use different time functions, which can
differ by more than a second - and user code is left guessing which one is
used.
In addition, most timer functions in POE want an absolute timestamp, which
is hard to create if all you have is a relative time and no function to
return the "current time".
And of course POE doesn't handle time jumps at all (not even when using
an event loop that happens to do that, such as L<EV>, as it does its own
unoptimised timer management).
lib/AnyEvent/Impl/POE.pm view on Meta::CPAN
"sig_handled"() call. The OS signals that usually kill or dump a
process are considered terminal in POE, but they never trigger a
coredump. These are: HUP, INT, QUIT and TERM.
Although AnyEvent calls C<sig_handled>, removing it has no apparent
effects on POE handling SIGINT.
refcount_increment SESSION_ID, COUNTER_NAME
Nowhere is explained which COUNTER_NAMEs are valid and which aren't - not
all scalars (or even strings) are valid counter names. Take your guess,
failure is of course completely silent. I found this out the hard way, as
the first name I came up with was silently ignored.
get_next_event_time() returns the time the next event is due, in a form
compatible with the UNIX time() function.
And surely, one would hope that POE supports sub-second accuracy as
documented elsewhere, unlike the explanation above implies. Yet:
POE::Kernel timers support subsecond accuracy, but donât expect too
lib/AnyEvent/Impl/POE.pm view on Meta::CPAN
This is impossible - how does the kernel know that a session is no longer
watching for some (external) event (e.g. by some other session)? It
cannot, and therefore this is wrong - but you would be hard pressed to
find out how to work around this and tell the kernel manually about such
events.
It gets worse, though - the notion of "task" or "resource", although used
throughout the documentation, is not defined in a usable way. For example,
waiting for a timeout is considered to be a task, waiting for a signal is
not (a session that only waits for a signal is considered finished and
gets removed). The user is left guessing when waiting for an event counts
as task and when not (in fact, the issue with signals is mentioned in
passing in a section about child watchers and directly contradicts earlier
parts in that document).
One could go on endlessly - ten years, no usable documentation.
It is likely that differences between documentation, or the one or two
things I had to guess, cause unanticipated problems with this adaptor.
=item Fragile and inconsistent API
The POE API is extremely inconsistent - sometimes you have to pass a
session argument, sometimes it gets ignored, sometimes a session-specific
method must not use a session argument.
Error handling is sub-standard as well: even for programming mistakes,
POE does not C<croak> but, in most cases, just sets C<$!> or simply does
nothing at all, leading to fragile programs.
( run in 0.248 second using v1.01-cache-2.11-cpan-702932259ff )