# now stop the current scan thread # to do this, write in a file th_com.thd the value 0 if (defined $thread) { open (THREADCOM, ">".LTG::dialog::THREADCOM) or die "Can't create/overwrite file: $!\n"; print (THREADCOM,"0"); close THREADCOM; # stop thread } print "create thread\n"; $thread = threads->new(\<G::scanChange::monitor());# \<G::scanChange::monitor); $thread->detach(); # let go off the new thread