develooper Front page | perl.perl5.porters | Postings from February 2003

Re: thread safe

Thread Previous | Thread Next
Brandon Willis
February 2, 2003 12:01
Re: thread safe
Message ID:

I don't see how creating many PerlInterpreter*'s will help as calls like
get_sv and the rest do not take in a PerlInterpreter* and thus would
have no way of knowing which PerlInterpreter I meant them to act on.  

I must be missing a piece of information.  Do the internal calls somehow
"know" that they are to act on one PerlInterpreter versus another? If
not how do I tell them "Hey you get_sv work on PerlInterpreter A."?

If I cannot give internal calls context then really I think my only
option is to learn how to spawn ithreads directly from C.


On Sat, 2003-02-01 at 16:18, A.Bergman wrote:
> On fredag, jan 31, 2003, at 19:33 Europe/Stockholm, 
> <> wrote:
> >
> > I am really new here so bear with me, please.
> >
> > Has anyone looked at making perl thread safe to embed?  I would like 
> > to be
> > able to launch an interpreter per thread from a C program (without 
> > context
> > switching).  Has anyone researched this?
> >
> > --Brandon
> >
> This is entirely possible, compile your perl with -Dusethreads and
> you will be able to create as many perl_create PerlInterpreter* as you 
> want
> and run them in pararel in different threads.
> Arthur
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About