in reply to Coro, AnyEvent and performance

Instead of mucking around with Windows 3.0-esque pseudo-threading and polling, you could just use proper threading:

#! perl -slw use strict; use bignum; use threads; use threads::shared; my $result :shared; async { my $comp = 0; for my $i ( 1 .. 1e6 ) { $comp += $i ** $i; } $result = '' . $comp; }->detach; while( sleep 1 ) { print "timer event"; last if $result; } print $result;

It's simpler, and actually works!


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.