Skip to content
golang's sys.WaitGroup in perl6
Other
  1. Other 100.0%
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
eg
lib
t
.gitignore
.travis.yml
LICENSE
META6.json
README.md

README.md

Build Status

NAME

WaitGroup - sys.WaitGroup in perl6

SYNOPSIS

use WaitGroup;
use HTTP::Tinyish;

my $wg = WaitGroup.new;

my @url = <
    http://www.golang.org/
    http://www.google.com/
    http://www.somestupidname.com/
>;

for @url -> $url {
    $wg.add(1);
    start {
        LEAVE $wg.done;
        my $res = HTTP::Tinyish.new.get($url, :bin);
        note "-> {$res<status>}, $url";
    };
}

$wg.wait;

DESCRIPTION

WaitGroup waits for a collection of promises to finish like sys.WaitGroup in golang.

SEE ALSO

https://golang.org/pkg/sync/#WaitGroup

AUTHOR

Shoichi Kaji skaji@cpan.org

COPYRIGHT AND LICENSE

Copyright 2016 Shoichi Kaji

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

You can’t perform that action at this time.