Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How to share huge data structure between threads?

by djantzen (Priest)
on Jan 10, 2003 at 15:04 UTC ( [id://225809]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use threads;
    use threads::shared;
    ...
    $hash{a} = \$svar   # okay - a reference to a shared variable
    $hash{a} = \$var    # This will die
    delete $hash{a}     # okay - all threads will see !exists($hash{a})
    
  2. or download this
    use strict;
    use warnings;
    ...
    </Update>
    $thr1->join();
    print $foo->{args}[0];
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-19 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found