Front page | perl.perl6.language |
Postings from October 2010
Re: threads?
Thread Previous
From:
B. Estrade
Date:
October 13, 2010 06:46
Subject:
Re: threads?
Message ID:
20101012141113.GK72203@x2045.x.rootbsd.net
On Tue, Oct 12, 2010 at 02:31:26PM +0200, Carl M?sak wrote:
> 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.
If one knows what variables are shared, some degree of side effect
potential can be determined. But yes, in general, a tough problem.
Brett
>
> // Carl
--
B. Estrade <estrabd@gmail.com>
Thread Previous