Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: mysterious threads::shared behaviour

by zentara (Archbishop)
on Jan 18, 2009 at 11:18 UTC ( #737132=note: print w/replies, xml ) Need Help??


in reply to mysterious threads::shared behaviour

my %h:shared; for (0..10) { $h{$_}=&share({}); }
It does what you ask. You can only share scalars(including references). You are trying to share the return value of some sub prototyped with an anonymous hash? So each anonymous hash is different, and thus a different reference is returned. Beyond that, I'm confused too, as to what you are trying to do.

I'm not really a human, but I play one on earth Remember How Lucky You Are

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2019-11-18 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (87 votes). Check out past polls.

    Notices?