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

Add safer wrapper for usleep with debug assertions

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: M4
    • Fix Version/s: None
    • Component/s: test, util
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: