Skip to content

Commit

Permalink
One last place where we can use push-worker
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Nov 1, 2017
1 parent 5e158d9 commit b386963
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/ThreadPoolScheduler.pm
Expand Up @@ -333,15 +333,13 @@ my class ThreadPoolScheduler does Scheduler {
unless $!general-queue.DEFINITE {
# We don't have any workers yet, so start one.
$!general-queue := nqp::create(Queue);
my $workers := nqp::create(IterationBuffer);
nqp::push(
$workers,
$!general-workers := push-worker(
nqp::create(IterationBuffer),
GeneralWorker.new(
queue => $!general-queue,
scheduler => self
)
);
$!general-workers := $workers;
scheduler-debug "Created initial general worker thread";
self!maybe-start-supervisor();
}
Expand Down

0 comments on commit b386963

Please sign in to comment.