actor: use simple comparison in LightArrayRevolverScheduler (#28981)
This commit is contained in:
parent
0e3cfbf584
commit
b8df0351cd
1 changed files with 1 additions and 1 deletions
|
|
@ -186,7 +186,7 @@ class LightArrayRevolverScheduler(config: Config, log: LoggingAdapter, threadFac
|
||||||
private val queue = new TaskQueue
|
private val queue = new TaskQueue
|
||||||
|
|
||||||
private def schedule(ec: ExecutionContext, r: Runnable, delay: FiniteDuration): TimerTask =
|
private def schedule(ec: ExecutionContext, r: Runnable, delay: FiniteDuration): TimerTask =
|
||||||
if (delay <= Duration.Zero) {
|
if (delay.length <= 0L) { // use simple comparision instead of Ordering for performance
|
||||||
if (stopped.get != null) throw SchedulerException("cannot enqueue after timer shutdown")
|
if (stopped.get != null) throw SchedulerException("cannot enqueue after timer shutdown")
|
||||||
ec.execute(r)
|
ec.execute(r)
|
||||||
NotCancellable
|
NotCancellable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue