Skip to content
timotheus edited this page Mar 12, 2013 · 2 revisions

The parallel class can be used to execute concurrent API calls.

##Usage

use eBay::API::Simple::RSS;
use eBay::API::Simple::Parallel;

my $pua = eBay::API::Simple::Parallel->new();

my $call1 = eBay::API::Simple::RSS->new( {
    parallel => $pua,
} );

$call1->execute(
    'https://github.com/timotheus/ebaysdk-python/wiki.atom',
);

my $call2 = eBay::API::Simple::RSS->new( {
    parallel => $pua,
} );

$call2->execute(
    ’https://github.com/timotheus/ebaysdk-perl/wiki.atom’
);

$pua->wait();

if ( $pua->has_error() ) {
    print "ONE OR MORE FAILURES!\n";
}

print $call1->response_content();
print $call2->response_content();

Clone this wiki locally