#!/usr/bin/perl use warnings; use threads; use Thread::Queue; use threads::shared; my %msg:shared; my $queue = new Thread::Queue; $msg{'1'} = "Hello \n"; $msg{'2'}= "Word \n"; $queue->enqueue(\%msg); $r = $queue->dequeue_nb; print "r = $r\n"; print "1 : ".$r->{'1'}; print "2: ".$r->{'2'};
In reply to Re: thread queue shared variable problem, URGENT.
by zentara
in thread thread queue shared variable problem, URGENT.
by denis.ua
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |