Hi, I have tried the following start of program:
use strict; use threads; use Win32::GUI; use Win32::Internet; use Compress::Zlib; my $thread = threads->new(\&download); ###$thread->join(); $thread->detach(); my $exit; $SIG{INT} = $SIG{BREAK} = $SIG{HUP} = sub {$exit++}; alarm(0); my $Win = Win32::GUI::Window->new( .... The program runs fine, the sub "download" seems to also run with no issues in a separate thread, but when closing the program, it gives that error that a thread was closed while 2 threads were running... If I use $thread->join() instead of $thread->detach(), this error doesn't appear, but the program waits for that thread, and doesn't create the main window at all. How can I do to let that thread running in the same time with the main program, but not give error on program close? Thank you. Teddy Teddy