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

Add safer wrapper for usleep with debug assertions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • M4
    • None
    • test, util
    • None

    Description

      One mistake that's easy to make is accidentally sleeping in the context of an RPC reactor thread. To catch this type of bug we should introduce a wrapper for usleep() which, in debug mode, checks some threadlocal "is_sleep_allowed" variable and FATALs on the reactor threads.

      Attachments

        Activity

          People

            tlipcon Todd Lipcon
            tlipcon Todd Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: