[GHC] #12685: getNumProcessors semantics dont match documentation

#12685: getNumProcessors semantics dont match documentation ----------------------------------------+--------------------------------- Reporter: Llgn | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Keywords: | Operating System: Linux Architecture: Unknown/Multiple | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: ----------------------------------------+--------------------------------- Hi, The documentation of getNumProcessors says : "Returns the number of CPUs that the machine has", but it is true only for program compiled with -threaded option. https://hackage.haskell.org/package/base-4.9.0.0/docs/GHC-Conc- Sync.html#v:getNumProcessors I guess the documentation is just misleading. Or is it a bug ? Regards -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12685 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12685: getNumProcessors semantics dont match documentation -------------------------------------+------------------------------------- Reporter: Llgn | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by sighingnow): The function `getNumberOfProcessors` also used in rts to decide the number of capabilities.Should we update the documentation as "Returns the number of CPUs that **the runtime can use**" ? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12685#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12685: getNumProcessors semantics dont match documentation -------------------------------------+------------------------------------- Reporter: Llgn | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Yes we should. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12685#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12685: getNumProcessors semantics dont match documentation -------------------------------------+------------------------------------- Reporter: Llgn | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by duog): I think this function returns the number of logical cores, including hyper-threading. It would be good to specify this in the documentation. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12685#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC