in reply to Re^3: Protecting External Data?!
in thread Protecting External Data?!
And then I tested it out:
and the output:#!/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();
So now I think that I don't know what I'm talking about.Thread running.. Done. Destroyed from thread 1 Destroyed from thread 0
If someone can point me to a relevant perldoc, I'll be greatefull.
thank,
Shmuel.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Protecting External Data?!
by plobsing (Friar) on Dec 23, 2007 at 05:10 UTC |