Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^7: Perl threading stability?

by BrowserUk (Pope)
on Jul 26, 2005 at 21:27 UTC ( #478373=note: print w/replies, xml ) Need Help??


in reply to Re^6: Perl threading stability?
in thread Perl threading stability?

My only concern is taking up too much resources.

With appropriate care, spawning a thread can take as little as 300/400k. It's just a case of ensuring that each thread only loads what it needs. Your main concern (reading between the lines still) is that sharing a large hash between many threads will cause large amounts of duplication--and your right, if you allow the default behaviour to take it's course, it will--but there are some fairly simple techniques for getting around that in most cases.

It really comes down to only sharing what is required a given thread with that thread. Whilst your overall application may have need to retain a large volume of data in memory, for most applications, each thread only needs access to some small part of the overall dataset, at any given time.

As for the spec, I'm really interested in seeing how iThreads can be used. I'll drop you a note and we can move on from there.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2018-10-20 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (112 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!