… | |
… | |
47 | transfer($c1, $main, -1); transfer($c1, $main, -1); |
47 | transfer($c1, $main, -1); transfer($c1, $main, -1); |
48 | transfer($c1, $main, -1); transfer($c1, $main, -1); |
48 | transfer($c1, $main, -1); transfer($c1, $main, -1); |
49 | } |
49 | } |
50 | } |
50 | } |
51 | |
51 | |
52 | $c0 = Coro::State::_newprocess [sub { |
52 | $c0 = new Coro::State sub { |
53 | doit0(1,2,3,4,5,6,7,8,9); |
53 | doit0(1,2,3,4,5,6,7,8,9); |
54 | }]; |
54 | }; |
55 | |
55 | |
56 | $c1 = Coro::State::_newprocess [sub { |
56 | $c1 = new Coro::State sub { |
57 | doit1(1,2,3,4,5,6,7,8,9); |
57 | doit1(1,2,3,4,5,6,7,8,9); |
58 | }]; |
58 | }; |
59 | |
59 | |
60 | transfer($main, $c0, 0); |
60 | transfer($main, $c0, 0); |
61 | transfer($main, $c1, -1); |
61 | transfer($main, $c1, -1); |
62 | |
62 | |
63 | timethese 100000, { |
63 | timethese 1000000, { |
64 | empty => '&a; &a', |
64 | empty => '&a; &a', |
65 | method => '$a->b(5); $a->b(6)', |
65 | method => '$a->b(5); $a->b(6)', |
66 | cede => 'cede', |
66 | cede => 'cede', |
67 | transfer0=> 'transfer($main, $c0, 0)', |
67 | transfer0=> 'transfer($main, $c0, 0)', |
68 | transfer1=> 'transfer($main, $c1, -1)', |
68 | transfer1=> 'transfer($main, $c1, -1)', |