You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by GitBox <gi...@apache.org> on 2022/11/03 09:37:11 UTC

[GitHub] [incubator-pekko] mdedetrich commented on a diff in pull request #4: !str Logging error instead of failing the `keepAlive` operator.

mdedetrich commented on code in PR #4:
URL: https://github.com/apache/incubator-pekko/pull/4#discussion_r1012673644


##########
akka-stream/src/main/scala/akka/stream/impl/Timers.scala:
##########
@@ -275,11 +275,15 @@ import akka.stream.stage._
           val now = System.nanoTime()
           // Timer is reliably cancelled if a regular element arrives first. Scheduler rather schedules too late
           // than too early so the deadline must have passed at this time.
-          assert(
-            now - nextDeadline >= 0,

Review Comment:
   > Agreed. Though, monotonicity does not seem to be mentioned in its javadoc, so there's some wiggle room in the JVM to do something else. It seems that the JVM uses a monotonic clock source if available or fall back on whatever is available. See https://stackoverflow.com/questions/51344787/in-what-cases-clock-monotonic-might-not-be-available
   
   I would opt for at least updating the comment that this behaviour is due to the possibility of a non-monotonic clock (along with a reference to the stack overflow question). Will update review to reflect this.



-- 
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: commits-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org