develooper Front page | perl.ithreads | Postings from June 2008

Re: thread hash bug?

Thread Previous
From:
Jerry D. Hedden
Date:
June 4, 2008 06:15
Subject:
Re: thread hash bug?
Message ID:
1ff86f510806040614x1962df03qc6e7c4512a883885@mail.gmail.com
Wong, Danny H. wrote:
> I'm trying to created a hash of array inside a thread, but the hash
> loses all its keys/values when leaving the function. Is there a bug in
> using a hash inside a thread? Any ideas?

1. use strict;
2. use warnings;
3. Read 'perldoc threads::shared'

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About