develooper Front page | perl.perl5.porters | Postings from August 2001

XS BOOT: and threading

Thread Next
From:
Nicholas Clark
Date:
August 26, 2001 08:22
Subject:
XS BOOT: and threading
Message ID:
20010826162219.H4950@plum.flirble.org
If XS code provides a code in BOOT: does perl make any guarantees that the
bootstrap code on a module is locked so that only one thread can ever enter
it?

I'm assuming that if no explicit lock is made then 2 threads attempting to
use a Dynaloaded module can both end up calling the BOOT code. Am I right?

Basically I'm thinking of initialising a static SV * in the BOOT: section
and wonder if I need to do something to be threadsafe.

[The SV is newSVpvn("none",4) and never needs to change]

Dynaloader supports unload now doesn't it? Is there un-BOOT code to free these
sort of things?

Nicholas Clark

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