Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix issues with reporting warnings on threads.
  • Loading branch information
jnthn committed Sep 7, 2014
1 parent 57573e8 commit 22a4c05
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/core/Thread.pm
Expand Up @@ -14,7 +14,16 @@ my class Thread {

submethod BUILD(:&code!, :$!app_lifetime as Bool = False, :$!name as Str = "<anon>") {
$!vm_thread := nqp::newthread(
{ my $*THREAD = self; code(); },
{
my $*THREAD = self;
CONTROL {
default {
my Mu $vm-ex := nqp::getattr(nqp::decont($_), Exception, '$!ex');
nqp::getcomp('perl6').handle-control($vm-ex);
}
}
code();
},
$!app_lifetime ?? 1 !! 0);
}

Expand Down

0 comments on commit 22a4c05

Please sign in to comment.