----- Original Message ----- From: "Hezekiah M. Carty" >> On Win32 perls, fork() is implemented via multi-threading, and I suspect >> that this problem might go away if one (or more) plplot global(s) was >> instead assigned on a per-thread basis using TLS (thread local storage).
> Your diagnosis is likely dead on. I have not used PLplot + Perl + > fork + Windows, but if it works the way you suggest then using PLplot > in that environment is unsafe. There are a number of global state > variables used, both in tracking the current state of PLplot as a > whole as well as in certain plotting functions. The only safe way to > use PLplot in this environment is to ensure that PLplot calls are all > handled from a single thread. If you do have a way to spawn multiple, > independent processes then using PLplot in each of those processes > would be safe. Yes, this can be done in perl using system() to launch a separate perl process - and that works quite well even on Windows. (It can be a bit of a kludge to code, but it's the approach I'll probably take in order to "fix" the problem with the PDL::Graphics::PLplot test script.) > Thread safety would be a wonderful thing to have in PLplot, and it > will hopefully be added at some point. This work will require a large > number of changes to PLplot's internals and likely broad changes to > the API as well. Contributions toward this, of course, are more than > welcome! I agree that a thread safety option would be a welcome addition - though I'm by no means *complaining* about its absence. I just wanted some reassurance that my summation of the situation was not amiss, and I think you've given me that reassurance. Thanks for the reply, Hez ! Cheers, Rob ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ Plplot-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-general
