sleet has asked for the wisdom of the Perl Monks concerning the following question:
# Make all the form submissions happen at same instant. Wait until # every thread finishes their initial requests and processing before # submitting. use Coro 'async'; use LWP::Protocol::AnyEvent::http; BEGIN { *CORE::GLOBAL::sleep = \&Coro::AnyEvent::sleep; } my @q = map { async { prepare_requests() } } 1 .. $count; @q = map { $_->join } @q; @q = map { async { submit_form(@_) } $_ } @q; $_->join for @q;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Which process management module to switch from Coro?
by sleet (Pilgrim) on Dec 31, 2016 at 19:21 UTC | |
|
Re: Which process management module to switch from Coro?
by Corion (Patriarch) on Dec 30, 2016 at 21:12 UTC | |
by morgon (Priest) on Dec 31, 2016 at 18:30 UTC | |
by sleet (Pilgrim) on Dec 30, 2016 at 21:32 UTC | |
by Corion (Patriarch) on Dec 30, 2016 at 21:40 UTC | |
by sleet (Pilgrim) on Dec 30, 2016 at 21:54 UTC | |
by runrig (Abbot) on Dec 30, 2016 at 22:31 UTC | |
|
Re: Which process management module to switch from Coro?
by genio (Beadle) on Dec 30, 2016 at 19:49 UTC | |
by sleet (Pilgrim) on Dec 30, 2016 at 21:35 UTC |