while (1) { sleep 1; my $thread = threads->new(\&work_sub); }