--- deliantra/server/lib/cf.pm 2008/09/22 01:33:09 1.450 +++ deliantra/server/lib/cf.pm 2008/09/22 05:42:41 1.451 @@ -83,7 +83,7 @@ our %EXT_CORO = (); # coroutines bound to extensions our %EXT_MAP = (); # pluggable maps -our $RELOAD; # number of reloads so far +our $RELOAD; # number of reloads so far, non-zero while in reload our @EVENT; our $CONFDIR = confdir; @@ -343,6 +343,7 @@ # wait for lock, if any while ($LOCK{$key}) { + #local $Coro::current->{desc} = "$Coro::current->{desc} "; push @{ $LOCK{$key} }, $Coro::current; Coro::schedule; } @@ -3582,11 +3583,9 @@ _gv_clear *{"$pkg$name"}; # use PApp::Util; PApp::Util::sv_dump *{"$pkg$name"}; } - warn "cleared package #$pkg\n";#d# + warn "cleared package $pkg\n";#d# } -our $RELOAD; # how many times to reload - sub do_reload_perl() { # can/must only be called in main if ($Coro::current != $Coro::main) { @@ -3709,7 +3708,7 @@ # doing reload synchronously and two reloads happen back-to-back, # coro crashes during coro_state_free->destroy here. - $RELOAD_WATCHER ||= EV::timer 0, 0, sub { + $RELOAD_WATCHER ||= EV::timer $TICK * 1.5, 0, sub { do_reload_perl; undef $RELOAD_WATCHER; };