Thread-Queue-Multiplex
view release on metacpan or search on metacpan
lib/Thread/Queue/Multiplex.pm view on Meta::CPAN
a copy of the subscriber mapping hash, and is responsible for iterating
over the hash to read each subscriber's results
=back
A normal processing sequence for Thread::Queue::Multiplex might be:
#
# Thread A (the client):
#
...marshal parameters for a coroutine...
my $id = $tqm->publish('function_name', \@paramlist);
my $results = $tqm->dequeue_response($id);
while (($subID, $subresult) = each %$results) {
...process $results...
}
#
# Thread B (a subscriber):
#
while (1) {
my $call = $tqm->dequeue;
( run in 0.676 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )