Guest User

Untitled

a guest
Jun 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. use Coro;
  2. use Coro::Specific;
  3.  
  4. my $ref = Coro::Specific->new;
  5.  
  6. my @coros;
  7. for (0..10) {
  8. push @coros, async {
  9. warn $$ref++;
  10. cede;
  11. warn $$ref++;
  12. cede;
  13. };
  14. }
  15.  
  16. $_->join for @coros;
Add Comment
Please, Sign In to add comment