… | |
… | |
57 | |
57 | |
58 | while () { |
58 | while () { |
59 | if ($cf::LOADAVG > $SWAP_LOAD2) { |
59 | if ($cf::LOADAVG > $SWAP_LOAD2) { |
60 | cf::wait_for_tick; |
60 | cf::wait_for_tick; |
61 | } else { |
61 | } else { |
62 | Coro::EV::timer_once $SCHEDULE_INTERVAL; |
62 | Coro::AnyEvent::sleep $SCHEDULE_INTERVAL; |
63 | } |
63 | } |
64 | |
64 | |
65 | # this weird form of iteration over values is used because |
65 | # this weird form of iteration over values is used because |
66 | # the hash changes underneath us frequently, and 'for' |
66 | # the hash changes underneath us frequently, and 'for' |
67 | # keeps a direct reference to the value without (in 5.8 perls) |
67 | # keeps a direct reference to the value without (in 5.8 perls) |