#!/usr/bin/perl
use
strict;
use
warnings;
my
$gov
= CPS::Governor::Deferred->new;
gkforeach(
$gov
, [ 1 .. 10 ],
sub
{
my
(
$item
,
$knext
) =
@_
;
"A$item "
;
goto
&$knext
;
},
sub
{},
);
gkforeach(
$gov
, [ 1 .. 10 ],
sub
{
my
(
$item
,
$knext
) =
@_
;
"B$item "
;
goto
&$knext
;
},
sub
{},
);
$gov
->flush;
"\n"
;