develooper Front page | perl.perl5.porters | Postings from February 2012

Re: [perl #108470] Term::ReadLine should use AE instead of Tk forevent looping

Thread Previous | Thread Next
From:
Marc Lehmann
Date:
February 1, 2012 17:43
Subject:
Re: [perl #108470] Term::ReadLine should use AE instead of Tk forevent looping
Message ID:
20120202014243.GC27800@schmorp.de
On Thu, Jan 19, 2012 at 07:06:11AM +0100, "Konovalov, Vadim (Vadim)** CTR **" <vadim.konovalov@alcatel-lucent.com> wrote:
> > one event loop.  With this patch, it will support *most* 
> > event loops available 
> > in Perl.  And any that aren't supported could potentially be 
> > added to AE 
> > without having to maintain T::RL's event support, benefiting 
> > not just T::RL, 
> > but any other AE-based module.
> 
> what most event loops it do support?
> Gtk? Tcl? Qt?

Just FYI, AnyEvent supports EV, Event, Glib/Gtk/etc., Tk/Tcl, POE, Irssi,
IO::Async, Cocoa and FLTK.

In addition, it has a very simple pure-perl event loop (AnyEvent::Loop)
that it can fall back to in case no other event loop is available, so it
can guarantee to work even in the absence of other event loops (and it is
guaranteed to be pure-perl as well).

It does support Qt directly, but Qt requires some special initialisation,
so is not transparent.

It can use Wx and Prima through POE (it actively probes for both) - these
require polling, which I didn't consider very useful, but nevertheless,
they can work too, with any AnyEvent-using module.

It is supported by rxvt-unicode, which allows non-blocking AnyEvent code
to be run (so backends can also be provided by other programs without
requiring support in AnyEvent - the API for that has been very stable as
well).

Backends for additional event loops are not trivial to write (because
AnyEvent makes certain promises that an existing event loop might not offer,
which requires a good understanding of the event loop in question), but are
usually quite short - here is a very typical example:
"http://cvs.schmorp.de/AnyEvent/lib/AnyEvent/Impl/Glib.pm"

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp@schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About