BEGIN { if ($Config{use5005threads}) { debug( "5005 Threads\n" ); eval 'use Thread qw(yield); use Thread::Queue'; die $@ if $@; $conn = start_connection( 1 ); $telnetprintqueue = Thread::Queue->new; $screenprintqueue = Thread::Queue->new; $connectqueue = Thread::Queue->new; } elsif ($Config{useithreads}) { debug( "I-Threads\n" ); eval 'use threads; use threads::shared; use Thread::Queue'; die $@ if $@; 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 ); } }