--- deliantra/server/lib/cf.pm 2008/10/01 05:50:19 1.457 +++ deliantra/server/lib/cf.pm 2008/12/13 20:34:37 1.458 @@ -34,6 +34,7 @@ use Safe::Hole; use Storable (); +use Guard (); use Coro (); use Coro::State; use Coro::Handle; @@ -332,7 +333,7 @@ =item my $lock = cf::lock_acquire $string Wait until the given lock is available and then acquires it and returns -a Coro::guard object. If the guard object gets destroyed (goes out of scope, +a L object. If the guard object gets destroyed (goes out of scope, for example when the coroutine gets canceled), the lock is automatically returned. @@ -376,7 +377,7 @@ $LOCK{$key} = []; $LOCKER{$key} = $Coro::current;#d# - Coro::guard { + Guard::guard { delete $LOCKER{$key};#d# # wake up all waiters, to be on the safe side $_->ready for @{ delete $LOCK{$key} }; @@ -392,7 +393,7 @@ sub freeze_mainloop { tick_inhibit_inc; - Coro::guard \&tick_inhibit_dec; + &Guard::guard (\&tick_inhibit_dec); } =item cf::periodic $interval, $cb