… | |
… | |
63 | |
63 | |
64 | # configure various modules to our taste |
64 | # configure various modules to our taste |
65 | # |
65 | # |
66 | $Storable::canonical = 1; # reduce rsync transfers |
66 | $Storable::canonical = 1; # reduce rsync transfers |
67 | Coro::State::cctx_stacksize 256000; # 1-2MB stack, for deep recursions in maze generator |
67 | Coro::State::cctx_stacksize 256000; # 1-2MB stack, for deep recursions in maze generator |
68 | Compress::LZF::sfreeze_cr { }; # prime Compress::LZF so it does not use require later |
|
|
69 | |
68 | |
70 | $Coro::main->prio (Coro::PRIO_MAX); # run main coroutine ("the server") with very high priority |
69 | $Coro::main->prio (Coro::PRIO_MAX); # run main coroutine ("the server") with very high priority |
|
|
70 | |
|
|
71 | { |
|
|
72 | # very ugly, but ensure we acquire the storable lock |
|
|
73 | |
|
|
74 | sub net_mstore { |
|
|
75 | my $guard = Coro::Storable::guard; |
|
|
76 | &Storable::net_mstore |
|
|
77 | } |
|
|
78 | |
|
|
79 | sub mretrieve { |
|
|
80 | my $guard = Coro::Storable::guard; |
|
|
81 | &Storable::mretrieve |
|
|
82 | } |
|
|
83 | |
|
|
84 | Compress::LZF::set_serializer "Coro::Storable", "cf::net_mstore", "cf::mretrieve"; |
|
|
85 | Compress::LZF::sfreeze_cr { }; # prime Compress::LZF so it does not use require later |
|
|
86 | } |
71 | |
87 | |
72 | sub WF_AUTOCANCEL () { 1 } # automatically cancel this watcher on reload |
88 | sub WF_AUTOCANCEL () { 1 } # automatically cancel this watcher on reload |
73 | |
89 | |
74 | our %COMMAND = (); |
90 | our %COMMAND = (); |
75 | our %COMMAND_TIME = (); |
91 | our %COMMAND_TIME = (); |