Roiocam commented on code in PR #887:
URL: https://github.com/apache/incubator-pekko/pull/887#discussion_r1437500370


##########
actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala:
##########
@@ -105,12 +105,14 @@ class LightArrayRevolverScheduler(config: Config, log: 
LoggingAdapter, threadFac
 
   override def scheduleWithFixedDelay(initialDelay: FiniteDuration, delay: 
FiniteDuration)(runnable: Runnable)(
       implicit executor: ExecutionContext): Cancellable = {
+    checkZeroPeriod(delay.toNanos)
     checkMaxDelay(roundUp(delay).toNanos)
     super.scheduleWithFixedDelay(initialDelay, delay)(runnable)
   }
 
   override def schedule(initialDelay: FiniteDuration, delay: FiniteDuration, 
runnable: Runnable)(
       implicit executor: ExecutionContext): Cancellable = {
+    checkZeroPeriod(delay.toNanos)

Review Comment:
   make sense,  this is not something that wroth to abstract, use inline we 
could gain less stack frame



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to