in reply to Perl Interpretor name with multiple instances

I did say this before, but you weren't paying attention. Look at what you found. It's obvious that the perl.h API is not thread-safe. Nowhere does it actually state that it is thread-safe. If you want to use multiple perl objects, you are sadly reduced to these no-so-worthy function pulled straight from the man pages:
my_perl = perl_alloc(); perl_construct(my_perl); perl_parse(my_perl, NULL, argc, argv, (char **)NULL); perl_run(my_perl); perl_destruct(my_perl); perl_free(my_perl);
You can parse any valid perl using this method. Look more at perlembed to see how the API abuses the assumption that there is only one interpreter.

Remember, Rule #1 of Threading reads: "A library is not thread-safe unless specifically described that it is." Neither EXTERN.h nor perl.h are thread-safe.

AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

Replies are listed 'Best First'.
Re: Re: Perl Interpretor name with multiple instances
by Anonymous Monk on Dec 14, 2000 at 09:01 UTC
    Thanks Mr. AgentM, Just i want to confirm if my understanding is correct. Thanks, Poornachandran SM