golang's sys.WaitGroup in perl6
Other
Switch branches/tags
Nothing to show
Latest commit 4e155a3 May 3, 2017 @skaji committed on GitHub Merge pull request #1 from samcv/SPDX-license
Use SPDX identifier in license field of META6.json
Permalink
Failed to load latest commit information.
eg init Dec 7, 2016
lib send Nil Dec 7, 2016
t init Dec 7, 2016
.gitignore
.travis.yml init Dec 7, 2016
LICENSE init Dec 7, 2016
META6.json Use SPDX identifier in license field of META6.json Apr 27, 2017
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.