Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Lazily initialize $*SCHEDULER
  • Loading branch information
lizmat committed Sep 10, 2014
1 parent f79201d commit d1dd37e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/ThreadPoolScheduler.pm
Expand Up @@ -137,6 +137,8 @@ my class ThreadPoolScheduler does Scheduler {
}

# This thread pool scheduler will be the default one.
$PROCESS::SCHEDULER = ThreadPoolScheduler.new();
multi sub INITIALIZE_DYNAMIC('$*SCHEDULER') {
PROCESS::<$SCHEDULER> = ThreadPoolScheduler.new();
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit d1dd37e

Please sign in to comment.