Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Expose underlying scheduler queue.
For the sake of things that want to use it as a target for any
asynchronous operations.
  • Loading branch information
jnthn committed Apr 20, 2014
1 parent a4e2a0f commit 327e9dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/ThreadPoolScheduler.pm
Expand Up @@ -57,8 +57,11 @@ my class ThreadPoolScheduler does Scheduler {
if $!initial_threads > $!max_threads;
}

# This goes here for now, will be needed more widely soon.
my class AsyncCancellation is repr('AsyncTask') { }
method queue() {
self!initialize unless $!started_any;
self!maybe_new_thread() unless $!started_any;
$!queue
}

method cue(&code, :$at, :$in, :$every, :$times = 1, :&catch ) {
my class TimerCancellation is repr('AsyncTask') { }
Expand Down

0 comments on commit 327e9dc

Please sign in to comment.