#!/usr/bin/perl -w use strict; use threads; sub thr { print "Thread running.. Done.\n"; } sub run_test { my $x = bless {}, 'Obj'; threads->create(\&thr)->join(); } sub Obj::DESTROY { print "Destroyed from thread ", threads->tid, "\n"; } run_test(); #### Thread running.. Done. Destroyed from thread 1 Destroyed from thread 0