… | |
… | |
225 | =item $cf::RUNTIME |
225 | =item $cf::RUNTIME |
226 | |
226 | |
227 | The time this server has run, starts at 0 and is increased by $cf::TICK on |
227 | The time this server has run, starts at 0 and is increased by $cf::TICK on |
228 | every server tick. |
228 | every server tick. |
229 | |
229 | |
230 | =item $cf::CONFDIR $cf::DATADIR $cf::LIBDIR $cf::PODDIR |
230 | =item $cf::CONFDIR $cf::DATADIR $cf::LIBDIR $cf::PODDIR |
231 | $cf::MAPDIR $cf::LOCALDIR $cf::TMPDIR $cf::UNIQUEDIR |
231 | $cf::MAPDIR $cf::LOCALDIR $cf::TMPDIR $cf::UNIQUEDIR |
232 | $cf::PLAYERDIR $cf::RANDOMDIR $cf::BDBDIR |
232 | $cf::PLAYERDIR $cf::RANDOMDIR $cf::BDBDIR |
233 | |
233 | |
234 | Various directories - "/etc", read-only install directory, perl-library |
234 | Various directories - "/etc", read-only install directory, perl-library |
235 | directory, pod-directory, read-only maps directory, "/var", "/var/tmp", |
235 | directory, pod-directory, read-only maps directory, "/var", "/var/tmp", |
… | |
… | |
510 | } |
510 | } |
511 | } |
511 | } |
512 | |
512 | |
513 | =item cf::lock_wait $string |
513 | =item cf::lock_wait $string |
514 | |
514 | |
515 | Wait until the given lock is available. See cf::lock_acquire. |
515 | Wait until the given lock is available. See cf::lock_acquire. |
516 | |
516 | |
517 | =item my $lock = cf::lock_acquire $string |
517 | =item my $lock = cf::lock_acquire $string |
518 | |
518 | |
519 | Wait until the given lock is available and then acquires it and returns |
519 | Wait until the given lock is available and then acquires it and returns |
520 | a L<Guard> object. If the guard object gets destroyed (goes out of scope, |
520 | a L<Guard> object. If the guard object gets destroyed (goes out of scope, |
… | |
… | |
649 | BEGIN { *async = \&Coro::async_pool } |
649 | BEGIN { *async = \&Coro::async_pool } |
650 | |
650 | |
651 | =item cf::sync_job { BLOCK } |
651 | =item cf::sync_job { BLOCK } |
652 | |
652 | |
653 | The design of Deliantra requires that the main coroutine ($Coro::main) |
653 | The design of Deliantra requires that the main coroutine ($Coro::main) |
654 | is always able to handle events or runnable, as Deliantra is only |
654 | is always able to handle events or is runnable, as Deliantra is only |
655 | partly reentrant. Thus "blocking" it by e.g. waiting for I/O is not |
655 | partly reentrant. Thus "blocking" it by e.g. waiting for I/O is not |
656 | acceptable. |
656 | acceptable. |
657 | |
657 | |
658 | If it must be done, put the blocking parts into C<sync_job>. This will run |
658 | If it must be done, put the blocking parts into C<sync_job>. This will run |
659 | the given BLOCK in another coroutine while waiting for the result. The |
659 | the given BLOCK in another coroutine while waiting for the result. The |