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.496 by root, Sun Nov 15 18:03:59 2009 UTC vs.
Revision 1.498 by elmex, Tue Jan 5 16:16:37 2010 UTC

3141our $safe_hole = new Safe::Hole; 3141our $safe_hole = new Safe::Hole;
3142 3142
3143$SIG{FPE} = 'IGNORE'; 3143$SIG{FPE} = 'IGNORE';
3144 3144
3145$safe->permit_only (Opcode::opset qw( 3145$safe->permit_only (Opcode::opset qw(
3146 :base_core :base_mem :base_orig :base_math 3146 :base_core :base_mem :base_orig :base_math :base_loop
3147 grepstart grepwhile mapstart mapwhile 3147 grepstart grepwhile mapstart mapwhile
3148 sort time 3148 sort time
3149)); 3149));
3150 3150
3151# here we export the classes and methods available to script code 3151# here we export the classes and methods available to script code
3880 3880
3881our @WAIT_FOR_TICK; 3881our @WAIT_FOR_TICK;
3882our @WAIT_FOR_TICK_BEGIN; 3882our @WAIT_FOR_TICK_BEGIN;
3883 3883
3884sub wait_for_tick { 3884sub wait_for_tick {
3885 return if tick_inhibit || $Coro::current == $Coro::main; 3885 return Coro::cede if tick_inhibit || $Coro::current == $Coro::main;
3886 3886
3887 my $signal = new Coro::Signal; 3887 my $signal = new Coro::Signal;
3888 push @WAIT_FOR_TICK, $signal; 3888 push @WAIT_FOR_TICK, $signal;
3889 $signal->wait; 3889 $signal->wait;
3890} 3890}
3891 3891
3892sub wait_for_tick_begin { 3892sub wait_for_tick_begin {
3893 return if tick_inhibit || $Coro::current == $Coro::main; 3893 return Coro::cede if tick_inhibit || $Coro::current == $Coro::main;
3894 3894
3895 my $signal = new Coro::Signal; 3895 my $signal = new Coro::Signal;
3896 push @WAIT_FOR_TICK_BEGIN, $signal; 3896 push @WAIT_FOR_TICK_BEGIN, $signal;
3897 $signal->wait; 3897 $signal->wait;
3898} 3898}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines