ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/map-scheduler.ext
(Generate patch)

Comparing deliantra/server/ext/map-scheduler.ext (file contents):
Revision 1.30 by root, Wed Feb 14 00:43:54 2007 UTC vs.
Revision 1.31 by root, Sat Feb 17 01:58:55 2007 UTC

30 30
31 #TODO: should also preload random maps... 31 #TODO: should also preload random maps...
32}; 32};
33 33
34our $SCHEDULER = cf::async_ext { 34our $SCHEDULER = cf::async_ext {
35 my $schedule_interval = Coro::Event->timer (after => 1, interval => $SCHEDULE_INTERVAL);
36 while () { 35 while () {
37 $schedule_interval->next unless cf::object::actives_size > $MAX_ACTIVES; 36 Coro::Event::do_timer (after => $SCHEDULE_INTERVAL);
38 37
39 # this weird form of iteration over values is used because 38 # this weird form of iteration over values is used because
40 # the hash changes underneath us frequently, and for 39 # the hash changes underneath us frequently, and for
41 # keeps a direct reference to the value without (in 5.8 perls) 40 # keeps a direct reference to the value without (in 5.8 perls)
42 # keeping a reference, so this is prone to crashes or worse. 41 # keeping a reference, so this is prone to crashes or worse.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines