BDBAsynchronous Berkeley DB access | |
Download |
BDB Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Marc Lehmann
- Publisher web site:
- http://www.goof.com/pcg/marc/
BDB Tags
BDB Description
Asynchronous Berkeley DB access BDB is a Perl module that provides asynchronous Berkeley DB access.SYNOPSIS use BDB; my $env = db_env_create; mkdir "bdtest", 0700; db_env_open $env, "bdtest", BDB::INIT_LOCK | BDB::INIT_LOG | BDB::INIT_MPOOL | BDB::INIT_TXN | BDB::RECOVER | BDB::USE_ENVIRON | BDB::CREATE, 0600; $env->set_flags (BDB::AUTO_COMMIT | BDB::TXN_NOSYNC, 1); my $db = db_create $env; db_open $db, undef, "table", undef, BDB::BTREE, BDB::AUTO_COMMIT | BDB::CREATE | BDB::READ_UNCOMMITTED, 0600; db_put $db, undef, "key", "data", 0, sub { db_del $db, undef, "key"; }; db_sync $db; # when you also use Coro, management is easy: use Coro::BDB; # automatic event loop integration with AnyEvent: use AnyEvent::BDB; # automatic result processing with EV: my $WATCHER = EV::io BDB::poll_fileno, EV::READ, \&BDB::poll_cb; # with Glib: add_watch Glib::IO BDB::poll_fileno, in => sub { BDB::poll_cb; 1 }; # or simply flush manually BDB::flush; Requirements: · Perl
BDB Related Software