Skip to content

Commit

Permalink
Always give VM code handle to newthread
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Aug 25, 2021
1 parent af7df61 commit 3f2218b
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/core.c/Thread.pm6
Expand Up @@ -36,29 +36,29 @@ my class Thread {
--> Nil
) {
constant THREAD_ERROR = 'Could not create a new Thread: ';
$!vm_thread := nqp::newthread(
anon sub THREAD-ENTRY() {
my $*THREAD = self;
CONTROL {
default {
my $entry := anon sub THREAD-ENTRY() {
my $*THREAD = self;
CONTROL {
default {
#?if !jvm
++$aborted;
++$aborted;
#?endif
#?if jvm
++$aborted;
++$aborted;
#?endif
my Mu $vm-ex := nqp::getattr(nqp::decont($_), Exception, '$!ex');
nqp::getcomp('Raku').handle-control($vm-ex);
}
my Mu $vm-ex := nqp::getattr(nqp::decont($_), Exception, '$!ex');
nqp::getcomp('Raku').handle-control($vm-ex);
}
code();
}
code();
#?if !jvm
++$completed;
++$completed;
#?endif
#?if jvm
++$completed;
++$completed;
#?endif
},
}
$!vm_thread := nqp::newthread(nqp::getattr($entry, Code, '$!do'),
$!app_lifetime ?? 1 !! 0);

#?if !jvm
Expand Down

0 comments on commit 3f2218b

Please sign in to comment.