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

Re: thread safe

Thread Previous | Thread Next
From:
Brandon Willis
Date:
February 2, 2003 12:01
Subject:
Re: thread safe
Message ID:
1044217322.24743.13.camel@purgatory
Arthur, 

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.

Thanks,
--Brandon

On Sat, 2003-02-01 at 16:18, A.Bergman wrote:
> On fredag, jan 31, 2003, at 19:33 Europe/Stockholm, 
> <willis@silverorb.net> 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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About