Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-63

boost::condition_variable can't use monotonic time, has bad performance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • M3
    • 0.9.0
    • util
    • None

    Description

      boost::condition_variable can't use monotonic time. So when someone adjusts his wall-clock time forward a bunch of threads will stall out.

      The performance is also bad as evidenced by RPC benchmarks where we did a lot better just using a simple wrapper around pthread_cond_wait. The reason is because boost::condition_variable actually creates its own, separate mutex, which it uses instead of the one you pass in.

      Attachments

        1. condition.h
          2 kB
          Colin McCabe

        Activity

          People

            tlipcon Todd Lipcon
            cmccabe Colin McCabe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: