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

Comparing AnyEvent-BDB/BDB.pm (file contents):
Revision 1.2 by root, Tue Jul 21 03:35:50 2009 UTC vs.
Revision 1.3 by root, Fri Jun 10 02:10:39 2011 UTC

26 26
27=cut 27=cut
28 28
29package AnyEvent::BDB; 29package AnyEvent::BDB;
30 30
31use strict; 31use common::sense;
32no warnings;
33 32
34use AnyEvent (); 33use AnyEvent ();
35use BDB (); 34use BDB ();
36 35
37use base Exporter::; 36use base Exporter::;
38 37
39our $VERSION = '1.1'; 38our $VERSION = '1.1';
40our $WATCHER; 39our $WATCHER;
41 40
42my $guard = AnyEvent::post_detect { 41my $guard = AnyEvent::post_detect {
43 $WATCHER = AnyEvent->io (fh => BDB::poll_fileno, poll => 'r', cb => \&BDB::poll_cb); 42 $WATCHER = AE::io BDB::poll_fileno, 0, \&BDB::poll_cb;
44}; 43};
45$WATCHER ||= $guard; 44$WATCHER ||= $guard;
46 45
47BDB::_on_next_submit \&AnyEvent::detect; 46BDB::_on_next_submit \&AnyEvent::detect;
48 47

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines