Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: How can I unshare something?

by renodino (Curate)
on Jul 18, 2008 at 23:16 UTC ( #698754=note: print w/ replies, xml ) Need Help??

in reply to How can I unshare something?

threads::shared can't handle blobs. Whatever they are.

Um, care to elaborate ? Is that "blobs" as in database large binary objects ? Or something else ? A Perl object, perhaps ? Your blanket statement may hide some misassumptions; it certainly makes it difficult to diagnose your issue.

That said, I fear there's currently no unshare API. Though it might be a useful addition, its difficult to define the behavior of something that would be unshared if some other thread still has a reference to it. Does unshare() apply globally, and suddenly every thread's reference becomes private again ? Or does it simply mean the single thread dissociates its private proxy from the shared version, but retains a copy of everything in it ? Plus there may be other housekeeping issues (what happens when you deref a reference to previously shared element; does it grab a copy from the shared version, or the unshared version ?).

If you elaborate on what "blobs" are, it may be possible to find an alternate solution to your dilemma.

Perl Contrarian & SQL fanboy

Comment on Re: How can I unshare something?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-11-28 21:11 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (745 votes), past polls