Skip to content

Commit

Permalink
Add bandaid for JVM: no native array in supervisor
Browse files Browse the repository at this point in the history
For some reasons using a native num array when starting the supervisor thread
does not work correctly on the JVM backend. It looks like a VMArrayInstance is
created (instead of VMArrayInstance_n). See also
https://irclog.perlgeek.de/perl6-dev/2017-10-31#i_15383761
  • Loading branch information
usev6 committed Nov 1, 2017
1 parent 697e4ec commit 581edd5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/ThreadPoolScheduler.pm
Expand Up @@ -491,7 +491,12 @@ my class ThreadPoolScheduler does Scheduler {
scheduler-debug "Supervisor started";
my num $last-rusage-time = nqp::time_n;
my int $last-usage = getrusage-total;
#?if !jvm
my num @last-utils = 0e0 xx NUM_SAMPLES;
#?endif
#?if jvm
my @last-utils = 0e0 xx NUM_SAMPLES;
#?endif
my int $cpu-cores = nqp::cpucores();
scheduler-debug "Supervisor thinks there are $cpu-cores CPU cores";
loop {
Expand Down

0 comments on commit 581edd5

Please sign in to comment.