the more complex the data that you need to share, the more thought you need to provide.
That just is not true. You need to share a hash full of data, t'is easy:
#! perl -slw use strict; use bignum; use threads; use threads::shared; use Data::Dump qw[ pp ]; my %results :shared; async { my %comps; for my $i ( 1 .. 1e6 ) { $comps{ $i } = $i ** $i; } %results = %comps; }->detach; while( sleep 1 ) { print "timer event"; last if %results; } pp %results;
In reply to Re^4: Coro, AnyEvent and performance
by BrowserUk
in thread Coro, AnyEvent and performance
by mcrose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |