in reply to Re^3: Passing objects between threads...any solutions? (shared objects)
in thread Passing objects between threads...any solutions ?

RE: dual CPU tests: will do, esp. since...

RE: pool of resource objects

I've managed to take your notion and run w/ it, and may even CPAN a module in the near future to do what I need, namely, create a ResourcePool object that acts as a pool/factory for objects of a specified type. Each thread gets the ResourcePool by default when the thread clones everything at create() time. Then the thread can either allocate() a fresh resource object from the ResourcePool, or use a scalar ID to get() an existing object. The thread either explicitly free()'s the object, or the resource's DESTROY() frees the object back to the pool when it goes out of scope (note the free() may only mean it is disassociated from the thread, but remains allocate()'d by other threads).

Thanks for getting me headed in the right direction...

  • Comment on Re^4: Passing objects between threads...any solutions? (shared objects)

Replies are listed 'Best First'.
Re^5: Passing objects between threads...any solutions? (shared objects)
by BrowserUk (Patriarch) on Jun 10, 2005 at 21:35 UTC

    You're welcome. I look forward to seeing how it pans out (as far as you are able to share it).


    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.