summaryrefslogtreecommitdiff
path: root/docs/users_guide/using.xml
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-12-06 15:12:07 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-12-06 16:00:27 +0000
commit92e7d6c92fdd14de424524564376d3522f2a40cc (patch)
tree5715d44012b452f5020ca14331a1fe50d5fd9600 /docs/users_guide/using.xml
parent8b75acd3ca25165536f18976c8d80cb62ad613e4 (diff)
downloadhaskell-92e7d6c92fdd14de424524564376d3522f2a40cc.tar.gz
Allow the number of capabilities to be increased at runtime (#3729)
At present the number of capabilities can only be *increased*, not decreased. The latter presents a few more challenges!
Diffstat (limited to 'docs/users_guide/using.xml')
-rw-r--r--docs/users_guide/using.xml14
1 files changed, 11 insertions, 3 deletions
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index 5bd6f11148..441ad5914b 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -2112,8 +2112,10 @@ f "2" = 2
<sect2 id="parallel-options">
<title>RTS options for SMP parallelism</title>
- <para>To run a program on multiple CPUs, use the
- RTS <option>-N</option> option:</para>
+ <para>There are two ways to run a program on multiple
+ processors:
+ call <literal>GHC.Conc.setNumCapabilities</literal> from your
+ program, or use the RTS <option>-N</option> option.</para>
<variablelist>
<varlistentry>
@@ -2148,7 +2150,13 @@ f "2" = 2
<para>The current value of the <option>-N</option> option
is available to the Haskell program
- via <literal>GHC.Conc.numCapabilities</literal>.</para>
+ via <literal>GHC.Conc.getNumCapabilities</literal>, and
+ it may be changed while the program is running by
+ calling <literal>GHC.Conc.setNumCapabilities</literal>.
+ Note: in the current implementation,
+ the <option>-N</option> value may only
+ be <emphasis>increased</emphasis>, not decreased, by
+ calling <literal>GHC.Conc.setNumCapabilities</literal>.</para>
</listitem>
</varlistentry>
</variablelist>