if($Config{5005threads}) { .. }
elsif($Config{ithreads}) { .. }
####
my $CONNECT = 0;
..
require Thread::Queue;
threads::shared::share($CONNECT);
####
..
require Thread::Queue;
our $CONNECT : shared = 0;
####
Argument to share needs to be passed as ref
at telnetclient.perl line 103.
####
require threads;
import threads;
require Thread::Queue;
import Thread::Queue;
import threads::shared;
share(\$CONNECT);
####
#6 0x40350460 in Perl_ithread_destruct ()
#7 0x403505a4 in ithread_mg_free ()
#8 0x400a4e31 in Perl_sv_unmagic ()
#9 0x403515fa in Perl_ithread_DESTROY ()
#10 0x40352d41 in XS_threads_DESTROY ()
#11 0x4009d71b in Perl_pp_entersub ()
####
if($Config{use5005threads})
{
debug("5005 Threads\n");
require Thread;
Thread->import('yield');
require Thread::Queue;
import Thread::Queue;
$conn = start_connection(1);
$telnetprintqueue = Thread::Queue->new();
$screenprintqueue = Thread::Queue->new();
$connectqueue = Thread::Queue->new();
}
elsif($Config{useithreads})
{
debug("I-Threads\n");
require threads;
import threads;
require Thread::Queue;
import Thread::Queue;
import threads::shared;
share(\$CONNECT);
share(\$PromptType);
$telnetprintqueue = Thread::Queue->new();
$screenprintqueue = Thread::Queue->new();
$conn = start_connection(2);
}
else
{
debug("No Threads\n");
$conn = start_connection(0);
}