develooper Front page | perl.perl5.porters | Postings from February 2003

Re: New SV Flag

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
February 11, 2003 16:28
Subject:
Re: New SV Flag
Message ID:
20030211192306.C27516@fdgroup.com
On Tue, Feb 11, 2003 at 08:05:44PM +0100, Arthur Bergman wrote:
> On tisdag, feb 11, 2003, at 20:00 Europe/Stockholm, Dave Mitchell wrote:
> > Surely, if the scalars which are attached to ops are shared across
> > ithreads, then all sorts of nasty things can go wrong, eg two threads
> > trying to increment the refcnt or modify a flag at the same time ????
> Depends on what, but for example the SVIV stored in method_named is not 
> at risk for that.

Yes, but consts get modified:

$ ./perl -DtsR -e 'sub f { push @a, \$_[0] } f("foo") for 1..10' 2>&1 | grep const
(-e:1)	const(IV(1))
(-e:1)	const(IV(10))
(-e:1)	const(PV("foo"\0))
(-e:1)	const(<2>PV("foo"\0))
(-e:1)	const(<3>PV("foo"\0))
(-e:1)	const(<4>PV("foo"\0))
(-e:1)	const(<5>PV("foo"\0))
(-e:1)	const(<6>PV("foo"\0))
(-e:1)	const(<7>PV("foo"\0))
(-e:1)	const(<8>PV("foo"\0))
(-e:1)	const(<9>PV("foo"\0))
(-e:1)	const(<10>PV("foo"\0))


-- 
My get-up-and-go just got up and went.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About