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

numThreads should be renamed to maxProcs

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: All Tools
    • Labels:
      None
    • Tools and Replicator
    • Needed

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            eric.daniels@mongodb.com Eric Daniels (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: