Interruptible's Atomic timer parameter is not typesafe

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • v5.0, v4.4
    • Service Arch 2021-07-12
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-44047 added an AtomicWord* parameter to several Interruptible wait functions, expressed as an AtomicWord<Microseconds::rep>*. This provides no type safety about the Duration it represents. There's no difference in the type system between Microseconds::rep, Milliseconds::rep, or plain int64_t. Another parameter to these functions is a Milliseconds duration, so it's easy to get confused. We should be able to directly accept an atomically-updated Duration, or come up with a typesafe proxy that can synchronously update a Duration.

       

              Assignee:
              Alex Li
              Reporter:
              Billy Donahue
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: