… | |
… | |
7 | |
7 | |
8 | our $SCHEDULER = cf::async_ext { |
8 | our $SCHEDULER = cf::async_ext { |
9 | $Coro::current->{desc} = "player scheduler"; |
9 | $Coro::current->{desc} = "player scheduler"; |
10 | |
10 | |
11 | while () { |
11 | while () { |
12 | Coro::EV::timer_once $SCHEDULE_INTERVAL; |
12 | Coro::AnyEvent::sleep $SCHEDULE_INTERVAL; |
13 | |
13 | |
14 | # this weird form of iteration over values is used because |
14 | # this weird form of iteration over values is used because |
15 | # the hash changes underneath us frequently, and for |
15 | # the hash changes underneath us frequently, and for |
16 | # keeps a direct reference to the value without (in 5.8 perls) |
16 | # keeps a direct reference to the value without (in 5.8 perls) |
17 | # keeping a reference, so this is prone to crashes or worse. |
17 | # keeping a reference, so this is prone to crashes or worse. |