in reply to Re^2: communication across threads using hash of hashes
in thread communication across threads using hash of hashes

I've fixed it, at least in terms of the shared scalar : )

If I declare the scalar with "our", and then update it in the processMessage sub using "$FeedAgent::sharedTestVar++;" then it works.

not sure why this works, but it does !!

Once again thanks very much for your help guys, I'm going to need to share the deeper levels of the shared hash of hashes as you mentioned before

  • Comment on Re^3: communication across threads using hash of hashes

Replies are listed 'Best First'.
Re^4: communication across threads using hash of hashes
by zentara (Cardinal) on Dec 21, 2009 at 12:21 UTC
    If I declare the scalar with "our"

    ...see perl global vars in subroutines and Why is 'our' good?

    ....also, get into the habit of locking your shared variables...... i fell into the lazy habit of not locking shared variables on my single cpu machine, and it would work for me, but not on the increasingly common multi-cpu machines


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku