in reply to How to share an objects array between threads ?

up
  • Comment on Re: How to share an objects array between threads ?

Replies are listed 'Best First'.
Re^2: How to share an objects array between threads ?
by BrowserUk (Patriarch) on Jun 19, 2010 at 12:50 UTC

    In essence, all you need is:

    use threads::shared; my @map :shared; ...

    But then, you need to use locking to prevent corruption through concurrent updates. And you'll also need to ensure that your objects are compatible with threading.

    All of this is documented in the module you mentioned: threads::shared. So rather than expecting us to reiterate all the information that you already have at your finger tips, you'd be more likely to get a response if you told us what you don;t understand; or better yet, what you've had trouble with implementing.

    As it is, you don't appear to have made any attempt to use the module you've pointed out you need.


    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.