diff options
| author | Patrick Dougherty <patrick.doc@ameritech.net> | 2017-07-23 12:55:37 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2017-07-23 15:47:21 -0400 |
| commit | 44b090be9a6d0165e2281542a7c713da1799e885 (patch) | |
| tree | 51bc316cb5a86810efbbe3ee606b9cdf8a82cd6e /docs/users_guide/using-concurrent.rst | |
| parent | d4e97212fdcb6127d750577aa7f2d709fee27d56 (diff) | |
| download | haskell-44b090be9a6d0165e2281542a7c713da1799e885.tar.gz | |
users-guide: Standardize and repair all flag references
This patch does three things:
1.) It simplifies the flag parsing code in `conf.py` to properly display
flag definitions created by `.. (ghc|rts)-flag::`. Additionally, all flag
references must include the associated arguments. Documentation has been
added to `editing-guide.rst` to explain this.
2.) It normalizes all flag definitions to a similar format. Notably, all
instances of `<>` have been replaced with `⟨⟩`. All references across the
users guide have been updated to match.
3.) It fixes a couple issues with the flag reference table's generation code,
which did not handle comma separated flags in the same cell and did not
properly reference flags with arguments.
Test Plan:
`SPHINXOPTS = -n` to activate "nitpicky" mode, which reports all broken
references. All remaining errors are references to flags without any
documentation.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13980
Differential Revision: https://phabricator.haskell.org/D3778
Diffstat (limited to 'docs/users_guide/using-concurrent.rst')
| -rw-r--r-- | docs/users_guide/using-concurrent.rst | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/users_guide/using-concurrent.rst b/docs/users_guide/using-concurrent.rst index d62b811345..f0236a3ced 100644 --- a/docs/users_guide/using-concurrent.rst +++ b/docs/users_guide/using-concurrent.rst @@ -16,7 +16,7 @@ for that module. Optionally, the program may be linked with the :ghc-flag:`-threaded` option (see :ref:`options-linker`. This provides two benefits: -- It enables the :rts-flag:`-N` to be used, which allows threads to run in +- It enables the :rts-flag:`-N ⟨x⟩` to be used, which allows threads to run in parallelism on a multi-processor or multi-core machine. See :ref:`using-smp`. - If a thread makes a foreign call (and the call is not marked @@ -31,7 +31,7 @@ programs: .. index:: single: RTS options; concurrent -.. rts-flag:: -C <s> +.. rts-flag:: -C ⟨s⟩ :default: 20 milliseconds @@ -107,8 +107,8 @@ There are two ways to run a program on multiple processors: call ``Control.Concurrent.setNumCapabilities`` from your program, or use the RTS ``-N`` options. -.. rts-flag:: -N <x> - -maxN <x> +.. rts-flag:: -N ⟨x⟩ + -maxN ⟨x⟩ Use ⟨x⟩ simultaneous threads when running the program. @@ -179,11 +179,11 @@ CPUs: Hints for using SMP parallelism ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Add the :rts-flag:`-s` RTS option when running the program to see timing stats, -which will help to tell you whether your program got faster by using -more CPUs or not. If the user time is greater than the elapsed time, -then the program used more than one CPU. You should also run the program -without :rts-flag:`-N` for comparison. +Add the :rts-flag:`-s [⟨file⟩]` RTS option when running the program to see +timing stats, which will help to tell you whether your program got faster by +using more CPUs or not. If the user time is greater than the elapsed time, then +the program used more than one CPU. You should also run the program without +:rts-flag:`-N ⟨x⟩` for comparison. The output of ``+RTS -s`` tells you how many "sparks" were created and executed during the run of the program (see :ref:`rts-options-gc`), |
