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

XS BOOT: and threading

Thread Next
Nicholas Clark
August 26, 2001 08:22
XS BOOT: and threading
Message ID:
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

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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About