Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't assume time-based things won't hog threads.
Fixes RT #123520.
  • Loading branch information
jnthn committed May 4, 2015
1 parent 66e15e5 commit 4ad94f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/ThreadPoolScheduler.pm
Expand Up @@ -104,7 +104,7 @@ my class ThreadPoolScheduler does Scheduler {
},
($delay * 1000).Int, ($every * 1000).Int,
TimerCancellation);
self!maybe_new_thread() if !$!started_any;
self!maybe_new_thread();
return
$cancellation = Cancellation.new(async_handles => [$handle]);
}
Expand All @@ -117,7 +117,7 @@ my class ThreadPoolScheduler does Scheduler {
!! &code,
($delay * 1000).Int, ($every * 1000).Int,
TimerCancellation);
self!maybe_new_thread() if !$!started_any;
self!maybe_new_thread();
return Cancellation.new(async_handles => [$handle]);
}
}
Expand All @@ -133,7 +133,7 @@ my class ThreadPoolScheduler does Scheduler {
($delay * 1000).Int, 0, TimerCancellation));
$delay = 0;
}
self!maybe_new_thread() if !$!started_any;
self!maybe_new_thread();
return Cancellation.new(:@async_handles);
}

Expand Down

0 comments on commit 4ad94f3

Please sign in to comment.