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

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.399 by root, Sun Dec 16 02:50:33 2007 UTC vs.
Revision 1.400 by root, Mon Dec 17 06:36:34 2007 UTC

10use Opcode; 10use Opcode;
11use Safe; 11use Safe;
12use Safe::Hole; 12use Safe::Hole;
13use Storable (); 13use Storable ();
14 14
15use Coro 4.1 (); 15use Coro 4.32 ();
16use Coro::State; 16use Coro::State;
17use Coro::Handle; 17use Coro::Handle;
18use Coro::EV; 18use Coro::EV;
19use Coro::Timer; 19use Coro::Timer;
20use Coro::Signal; 20use Coro::Signal;
21use Coro::Semaphore; 21use Coro::Semaphore;
22use Coro::AIO; 22use Coro::AIO;
23use Coro::BDB;
23use Coro::Storable; 24use Coro::Storable;
24use Coro::Util (); 25use Coro::Util ();
25 26
26use JSON::XS 2.01 (); 27use JSON::XS 2.01 ();
27use BDB (); 28use BDB ();
3630}; 3631};
3631$TICK_WATCHER->priority (EV::MAXPRI); 3632$TICK_WATCHER->priority (EV::MAXPRI);
3632 3633
3633{ 3634{
3634 BDB::min_parallel 8; 3635 BDB::min_parallel 8;
3635 BDB::max_poll_time $TICK * 0.1; 3636 BDB::max_poll_reqs $TICK * 0.1;
3636 $BDB_POLL_WATCHER = EV::io BDB::poll_fileno, EV::READ, \&BDB::poll_cb;
3637
3638 BDB::set_sync_prepare {
3639 my $status;
3640 my $current = $Coro::current;
3641 (
3642 sub {
3643 $status = $!;
3644 $current->ready; undef $current;
3645 },
3646 sub {
3647 Coro::schedule while defined $current;
3648 $! = $status;
3649 },
3650 )
3651 };
3652 3637
3653 unless ($DB_ENV) { 3638 unless ($DB_ENV) {
3654 $DB_ENV = BDB::db_env_create; 3639 $DB_ENV = BDB::db_env_create;
3655 $DB_ENV->set_flags (BDB::AUTO_COMMIT | BDB::REGION_INIT | BDB::TXN_NOSYNC 3640 $DB_ENV->set_flags (BDB::AUTO_COMMIT | BDB::REGION_INIT | BDB::TXN_NOSYNC
3656 | BDB::LOG_AUTOREMOVE, 1); 3641 | BDB::LOG_AUTOREMOVE, 1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines