Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-24075

HashTable::~HashTable has a sleep

    XMLWordPrintable

Details

    Description

      There's a usleep in the destructor based on the visitor count, this is very likely to not be needed

      HashTable::~HashTable() {
          // Use unlocked clear for the destructor, avoids lock inversions on VBucket
          // delete
          clear_UNLOCKED(true);
          // Wait for any outstanding visitors to finish.
          while (visitors > 0) {
      #ifdef _MSC_VER
              Sleep(1);
      #else
              usleep(100);
      #endif
          }
          delete []mutexes;
      }
      

      Attachments

        Activity

          People

            jwalker Jim Walker
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty