Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

possibility to overcome perl threads

by llancet (Friar)
on Oct 29, 2009 at 02:43 UTC ( #803858=perlquestion: print w/ replies, xml ) Need Help??
llancet has asked for the wisdom of the Perl Monks concerning the following question:

Is there any mechanism that can use thread without using perl's use threads;? Is there any package could do that?
Moreover, I don't want to use fork....
Thanks!!

Comment on possibility to overcome perl threads
Download Code
Re: possibility to overcome perl threads
by ikegami (Pope) on Oct 29, 2009 at 03:06 UTC

    Copy threads.pm to a different name?

    Ok, seriously, the module is available to copy and modify. Have a blast.

    XY Problem

      I mean some mechanism not using perl "ithread", because I hate the weird sharing mechanism. It seems that it's very hard to share objects between threads.

        If you want to use threads in Perl, you have to use Perl's threads. Threads need support at every level of the language in order to work.

        But that doesn't mean you can't build upon what's provided. Despite saying you mean something else, what you want is support in sharing objects. Sorry, I can't help you with that (not having done any threaded programming in Perl), but at least you know what you want now.

        it's very hard to share objects between threads.

        Could you describe the object(s) that you wish to share across threads? And why you feel the need to share them?

        Please note: I'm not implying that there is never a need to do this; just asking for a description of a situation when it is necessary advantagous to do so?


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://803858]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2014-09-02 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls