Uploaded image for project: 'MongoDB CLI Tools'
  1. MongoDB CLI Tools
  2. TOOLS-739

numThreads should be renamed to maxProcs

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: All Tools
    • Labels:
      None
    • Documentation Changes:
      Needed

      Description

      The use of numThreads is slightly confusing in that its name implies number of threads to use while it actually imposes an upper limit on how many logical CPUs can be used. maxProcs more accurately exemplifies the meaning in that it is literally a pass-through parameter to runtime.GOMAXPROCS. It technically leaks implementation but it's a hidden parameter to begin with that deals with an implementation detail.

      maxThreads would probably be appropriate as well but I believe it's GOMAXPROCS and not GOMAXTHREADS because a single logical cpu is only capable of processing a single thread of execution. This also avoids using the abstraction of threads which are slightly more OS specific.

        Attachments

          Activity

            People

            • Assignee:
              backlog-server-tools Backlog - Server Tools Team
              Reporter:
              eric.daniels Eric Daniels
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: