Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-1405

Threads.shutdown has unnecessary branch

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.20.0
    • None
    • None

    Description

              if (joinwait == -1) {
                t.join();
              } else {
                t.join(joinwait);
              }
      

      We don't need to use -1 as a special value, as join already has a special value of 0:

      From Thread.join() javadoc:
      "Waits at most millis milliseconds for this thread to die. A timeout of 0 means to wait forever."

      Attachments

        1. hbase-1405.patch
          1 kB
          Nitay Joffe

        Activity

          People

            nitay Nitay Joffe
            nitay Nitay Joffe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: