since SNMP traps are UDP based, the fastest way to send them is just to send them. no reason for threads of any sort here, the threads are just extra overhead. also, why create a new session each time?
my ($session, $error) = Net::SNMP->session( ... )
for ( 1..$num_traps ) {
$session->trap( ... );
}
$session->close();