Stuart_Brierley

Perl: Using threads->detach() destroys the Nimbus::Session object

Discussion created by Stuart_Brierley on Nov 20, 2012

I have a custom probe using multithreaded perl. I set up a session....

 

my $sess = Nimbus::smileyfrustrated:ession->new($prgname);

 

Then later in my probe I create a thread which I want to detach...

 

my $thr = threads->create(
sub { do stuff
})->detach();

 

Unfortunately, doing a detach or join kills the session:

 

Nov 19 14:29:33:099 customscript2: Object is destroyed,Nimbus::smileyfrustrated:ession=HASH(0x8f90658)

 

Has anyone come across this before?

Outcomes