Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: lock with references

by ISAI student (Scribe)
on Dec 21, 2012 at 04:32 UTC ( #1009855=note: print w/ replies, xml ) Need Help??


in reply to Re: lock with references
in thread lock with references

Relax, I have yet to encounter one, and not into punching anyone. I am doing major rework on a huge script, and trying to make the code more modular, w/o changing the basic algorithm. Hence, passing hundreds of lines of code to some subroutines, which setup shared variables. I have to use references, as two or more shared hashes are changed in 1 chunk of code, and seperating the commands is far too time consuming. I have never worked with threads, and was afraid of some unknown (to me) "gotcha". perlmonks is, IMHO, one of the best place to ask about this, with regards to PERL, of course.


Comment on Re^2: lock with references
Re^3: lock with references
by BrowserUk (Pope) on Dec 21, 2012 at 04:38 UTC
    I have to use references, as two or more shared hashes are changed in 1 chunk of code, and seperating the commands is far too time consuming....I have never worked with threads,...

    I've done lots of work with threads; and that first sentence makes no sense to me at all.

    Are these references, references to shared scalars as indicated in your first post?

    Or references to hashes as implied here?

    Or possibly references to scalars that are values in a shared hash?

    Or references to shared scalars that are values in a non-shard hash?

    Or...?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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.

    RIP Neil Armstrong

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-08-23 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (174 votes), past polls