… | |
… | |
58 | |
58 | |
59 | $c1 = new Coro::State sub { |
59 | $c1 = new Coro::State sub { |
60 | doit1(1,2,3,4,5,6,7,8,9); |
60 | doit1(1,2,3,4,5,6,7,8,9); |
61 | }; |
61 | }; |
62 | |
62 | |
63 | $c0->save (0); |
63 | #$c0->save (0); |
64 | $c1->save (-1); |
64 | #$c1->save (-1); |
65 | |
65 | |
66 | transfer($main, $c0); |
66 | transfer($main, $c0); |
67 | transfer($main, $c1); |
67 | transfer($main, $c1); |
68 | |
68 | |
|
|
69 | #Coro::State::enable_times 1; |
|
|
70 | #use Coro::Debug; Coro::Debug::command "ps";#d# |
|
|
71 | #(async { |
69 | timethese 1000000, { |
72 | timethese 5000000, { |
70 | function => 'a(5); a(6)', |
73 | function => 'a(5); a(6)', |
71 | method => '$a->b(5); $a->b(6)', |
74 | method => '$a->b(5); $a->b(6)', |
72 | cede => 'cede', |
75 | cede => 'cede', |
73 | transfer0 => 'transfer($main, $c0)', |
76 | transfer0 => 'transfer($main, $c0)', |
74 | transfer1 => 'transfer($main, $c1)', |
77 | transfer1 => 'transfer($main, $c1)', |
75 | }; |
78 | }; |
|
|
79 | #})->join; |
|
|
80 | #use Coro::Debug; Coro::Debug::command "ps";#d# |
76 | |
81 | |
77 | |
82 | |
78 | |
|
|