… | |
… | |
18 | |
18 | |
19 | my $w = AnyEvent->condvar; # stores wether a condition was flagged |
19 | my $w = AnyEvent->condvar; # stores wether a condition was flagged |
20 | $w->wait; # enters "main loop" till $condvar gets ->broadcast |
20 | $w->wait; # enters "main loop" till $condvar gets ->broadcast |
21 | $w->broadcast; # wake up current and all future wait's |
21 | $w->broadcast; # wake up current and all future wait's |
22 | |
22 | |
23 | =head1 WHY YOU SHOULD USE THIS MODULE |
23 | =head1 WHY YOU SHOULD USE THIS MODULE (OR NOT) |
24 | |
24 | |
25 | Glib, POE, IO::Async, Event... CPAN offers event models by the dozen |
25 | Glib, POE, IO::Async, Event... CPAN offers event models by the dozen |
26 | nowadays. So what is different about AnyEvent? |
26 | nowadays. So what is different about AnyEvent? |
27 | |
27 | |
28 | Executive Summary: AnyEvent is I<compatible>, AnyEvent is I<free of |
28 | Executive Summary: AnyEvent is I<compatible>, AnyEvent is I<free of |
… | |
… | |
57 | model>, AnyEvent also is free of bloat and policy: with POE or similar |
57 | model>, AnyEvent also is free of bloat and policy: with POE or similar |
58 | modules, you get an enourmous amount of code and strict rules you have |
58 | modules, you get an enourmous amount of code and strict rules you have |
59 | to follow. AnyEvent, on the other hand, is lean and to the point by only |
59 | to follow. AnyEvent, on the other hand, is lean and to the point by only |
60 | offering the functionality that is useful, in as thin as a wrapper as |
60 | offering the functionality that is useful, in as thin as a wrapper as |
61 | technically possible. |
61 | technically possible. |
|
|
62 | |
|
|
63 | Of course, if you want lots of policy (this is arguably somewhat useful in |
|
|
64 | many cases) and you want your users to the one and only event model your |
|
|
65 | module forces on them, you should I<not> use this module. |
62 | |
66 | |
63 | |
67 | |
64 | =head1 DESCRIPTION |
68 | =head1 DESCRIPTION |
65 | |
69 | |
66 | L<AnyEvent> provides an identical interface to multiple event loops. This |
70 | L<AnyEvent> provides an identical interface to multiple event loops. This |