ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
XS, multiple embedded interpreters & one time initialization
by Milosz Tanski other posts by this author
Jul 16 2008 8:14AM messages near this date
Re: watchdog() for threads tests? | [PATCH] threads::shared 1.26
Does Perl provide any facility, along the lines of pthread_once, that
can guarantee that a piece of code will only get run once; for code like
the initialization of an external libraries' static vars? The boot
section of the XS module is called each time an (embedded) interpreter
loads the module so that's not really a suitable spot. Alternatively, is
there there a way to statically initialize a perl_mutex, ala assigning
PTHREAD_MUTEX_INITIALIZER to a real pthread_mutex, that will work for
all the platforms that Perl supports threading?
 
The module I'm working with is XML::Xerces, which is a wrapper around
the apache project's xerces-c library. It has a few thread safety issues
that I'm working to solve.
 
Thanks,
-- Milosz

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved