Ben (>): > If perl6 can statically (at compile time) analyse subroutines and > methods and determine if they're reentrant, then it could > automatically use the lightest weight threads when it knows that the > entry sub won't have side effects or alter global data.
I'm often at the receiving end of this kind of reply, but... ...to a first approximation, I don't believe such analysis to be possible in Perl 6. Finding out whether something "won't have side effects" is tricky at best, squeezed in as we are between &eval, exuberant dynamism, and the Halting Problem. // Carl