in reply to Re^3: Threads memory consumption
in thread Threads memory consumption

Thanks alot ! used this method - and everything works for me great now. I have a question about this method - Can I have some shared data between the child forks ?

Replies are listed 'Best First'.
Re^5: Threads memory consumption
by zentara (Cardinal) on Dec 06, 2013 at 17:55 UTC
Re^5: Threads memory consumption
by zwon (Abbot) on Dec 06, 2013 at 15:07 UTC
    Yes you can, see IPC::Shareable and IPC::ShareLite, but I don't recommend you to use these -- refactor your program so it wouldn't require shared variables, or use some message passing module instead.
      Hey, Do you know if I can share a hash ? or even an object ? I want to share and lock an object that exist inside a hash - if accessed.. Thanks
      Can you recommend on a message passing module I can use ?
        It depends on your environment and requirements. Generally if you have any messaging system deployed (ActiveMQ, RabbitMQ, Spread Toolkit, Redis, etc) just use it. Or you can try ZMQ