Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
eg
 
 
lib
 
 
t
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

golang's sys.WaitGroup in perl6

Resources

License

Releases

No releases published

Languages

  • Other 100.0%
You can’t perform that action at this time.