ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.361 by root, Sun Aug 14 01:38:14 2011 UTC vs.
Revision 1.362 by root, Sun Aug 14 01:57:18 2011 UTC

1295); 1295);
1296 1296
1297our @isa_hook; 1297our @isa_hook;
1298 1298
1299sub _isa_set { 1299sub _isa_set {
1300 my @pkg = ("AnyEvent", (grep defined, map $_->[0], @isa_hook), $MODEL); 1300 my @pkg = ("AnyEvent", (map $_->[0], grep defined, @isa_hook), $MODEL);
1301 1301
1302 @{"$pkg[$_-1]::ISA"} = $pkg[$_] 1302 @{"$pkg[$_-1]::ISA"} = $pkg[$_]
1303 for 1 .. $#pkg; 1303 for 1 .. $#pkg;
1304 1304
1305 grep $_->[1], @isa_hook 1305 grep $_ && $_->[1], @isa_hook
1306 and AE::_reset (); 1306 and AE::_reset ();
1307} 1307}
1308 1308
1309# used for hooking AnyEvent::Strict and AnyEvent::Debug::Wrap into the class hierarchy 1309# used for hooking AnyEvent::Strict and AnyEvent::Debug::Wrap into the class hierarchy
1310sub _isa_hook($$;$) { 1310sub _isa_hook($$;$) {
1311 my ($i, $pkg, $reset_ae) = @_; 1311 my ($i, $pkg, $reset_ae) = @_;
1312 1312
1313 $isa_hook[$i] = [$pkg, $reset_ae]; 1313 $isa_hook[$i] = $pkg ? [$pkg, $reset_ae] : undef;
1314 1314
1315 _isa_set; 1315 _isa_set;
1316} 1316}
1317 1317
1318# all autoloaded methods reserve the complete glob, not just the method slot. 1318# all autoloaded methods reserve the complete glob, not just the method slot.
2420(even when used without AnyEvent), but most event loops have acceptable 2420(even when used without AnyEvent), but most event loops have acceptable
2421performance with or without AnyEvent. 2421performance with or without AnyEvent.
2422 2422
2423=item * The overhead AnyEvent adds is usually much smaller than the overhead of 2423=item * The overhead AnyEvent adds is usually much smaller than the overhead of
2424the actual event loop, only with extremely fast event loops such as EV 2424the actual event loop, only with extremely fast event loops such as EV
2425adds AnyEvent significant overhead. 2425does AnyEvent add significant overhead.
2426 2426
2427=item * You should avoid POE like the plague if you want performance or 2427=item * You should avoid POE like the plague if you want performance or
2428reasonable memory usage. 2428reasonable memory usage.
2429 2429
2430=back 2430=back

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines