… | |
… | |
32 | use Safe; |
32 | use Safe; |
33 | use Safe::Hole; |
33 | use Safe::Hole; |
34 | use Storable (); |
34 | use Storable (); |
35 | use Carp (); |
35 | use Carp (); |
36 | |
36 | |
37 | use Guard (); |
37 | use AnyEvent (); |
|
|
38 | use AnyEvent::IO (); |
|
|
39 | use AnyEvent::DNS (); |
|
|
40 | |
38 | use Coro (); |
41 | use Coro (); |
39 | use Coro::State; |
42 | use Coro::State; |
40 | use Coro::Handle; |
43 | use Coro::Handle; |
41 | use Coro::EV; |
44 | use Coro::EV; |
42 | use Coro::AnyEvent; |
45 | use Coro::AnyEvent; |
… | |
… | |
48 | use Coro::AIO; |
51 | use Coro::AIO; |
49 | use Coro::BDB 1.6; |
52 | use Coro::BDB 1.6; |
50 | use Coro::Storable; |
53 | use Coro::Storable; |
51 | use Coro::Util (); |
54 | use Coro::Util (); |
52 | |
55 | |
|
|
56 | use Guard (); |
53 | use JSON::XS 2.01 (); |
57 | use JSON::XS 2.01 (); |
54 | use BDB (); |
58 | use BDB (); |
55 | use Data::Dumper; |
59 | use Data::Dumper; |
56 | use Fcntl; |
60 | use Fcntl; |
57 | use YAML::XS (); |
61 | use YAML::XS (); |
… | |
… | |
3741 | LOG llevInfo, "Copyright (C) 1992 Frank Tore Johansen."; |
3745 | LOG llevInfo, "Copyright (C) 1992 Frank Tore Johansen."; |
3742 | |
3746 | |
3743 | $Coro::current->prio (Coro::PRIO_MAX); # give the main loop max. priority |
3747 | $Coro::current->prio (Coro::PRIO_MAX); # give the main loop max. priority |
3744 | |
3748 | |
3745 | # we must not ever block the main coroutine |
3749 | # we must not ever block the main coroutine |
3746 | local $Coro::idle = sub { |
3750 | $Coro::idle = sub { |
3747 | Carp::cluck "FATAL: Coro::idle was called, major BUG, use cf::sync_job!\n";#d# |
3751 | Carp::cluck "FATAL: Coro::idle was called, major BUG, use cf::sync_job!\n";#d# |
3748 | (async { |
3752 | (async { |
3749 | $Coro::current->{desc} = "IDLE BUG HANDLER"; |
3753 | $Coro::current->{desc} = "IDLE BUG HANDLER"; |
3750 | EV::loop EV::LOOP_ONESHOT; |
3754 | EV::loop EV::LOOP_ONESHOT; |
3751 | })->prio (Coro::PRIO_MAX); |
3755 | })->prio (Coro::PRIO_MAX); |