Skip to content

Commit

Permalink
Make off-by-one errors slightly less likely
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Jul 24, 2021
1 parent 9bcea87 commit 2f3e984
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ object IORuntimeConfig extends IORuntimeConfigCompanionPlatform {
cancelationCheckThreshold,
autoYieldThreshold,
enhancedExceptions,
2 << (Math.round(Math.log(traceBufferSize.toDouble) / Math.log(2)).toInt - 1))
1 << Math.round(Math.log(traceBufferSize.toDouble) / Math.log(2)).toInt)
else
throw new AssertionError(
s"Auto yield threshold $autoYieldThreshold must be a multiple of cancelation check threshold $cancelationCheckThreshold")
Expand Down

0 comments on commit 2f3e984

Please sign in to comment.