sub go_command { . . . my $thr = threads->create(\&sub1); if ($thr->is_joinable()) { $thr->join(); } } sub sub1 { print("In the thread\n"); } #### sub DESTROY { my $w = shift; $w->destroy if ($w->IsWidget); } #### sub _Destroyed { my $w = shift; my $a = delete $w->{'_Destroy_'}; if (ref($a)) { while (@$a) { my $ent = pop(@$a); if (ref $ent) {....}