push @device_thread, threads->new(sub {thread_job($key, $device_ip{$key}, $index)})->join;