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

Comparing deliantra/server/ext/map-tags.ext (file contents):
Revision 1.9 by root, Wed Sep 19 22:07:16 2007 UTC vs.
Revision 1.10 by root, Wed Nov 14 08:09:46 2007 UTC

104} 104}
105 105
106sub reload { 106sub reload {
107 my $guard = cf::lock_acquire "map-tags::reload"; 107 my $guard = cf::lock_acquire "map-tags::reload";
108 108
109 my $start = Event::time; 109 my $start = EV::time;
110 110
111 # 1. check for maps no longer existing 111 # 1. check for maps no longer existing
112 { 112 {
113 my @delkeys; 113 my @delkeys;
114 114
169# delete $map->{deny_reset}; 169# delete $map->{deny_reset};
170# } 170# }
171# } 171# }
172# } 172# }
173 173
174 warn sprintf "map-tag scan (%fs)", Event::time - $start; 174 warn sprintf "map-tag scan (%fs)", EV::time - $start;
175} 175}
176 176
177our $RELOAD_SCHEDULER = Event->timer ( 177our $RELOAD_SCHEDULER = cf::periodic $SCHEDULE_INTERVAL, sub {
178 after => 0, 178 cfd::async {
179 interval => $SCHEDULE_INTERVAL,
180 data => cf::WF_AUTOCANCEL,
181 cb => Coro::unblock_sub {
182 $Coro::current->prio (Coro::PRIO_MIN); 179 $Coro::current->prio (Coro::PRIO_MIN);
183 $Coro::current->desc ("map-tag scanner"); 180 $Coro::current->desc ("map-tag scanner");
184 reload; 181 reload;
185 }, 182 };
186); 183};
187 184
188# find all objects with the given tag, or at least try to 185# find all objects with the given tag, or at least try to
189sub find($) { 186sub find($) {
190 my ($tag) = @_; 187 my ($tag) = @_;
191 188

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines