summaryrefslogtreecommitdiff
path: root/docs/users_guide/exts/parallel.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/users_guide/exts/parallel.rst')
-rw-r--r--docs/users_guide/exts/parallel.rst31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/users_guide/exts/parallel.rst b/docs/users_guide/exts/parallel.rst
new file mode 100644
index 0000000000..c8348db507
--- /dev/null
+++ b/docs/users_guide/exts/parallel.rst
@@ -0,0 +1,31 @@
+.. _lang-parallel:
+
+Parallel and Concurrent
+=======================
+
+.. index::
+ single: parallelism
+ single: concurrency
+
+GHC implements some major extensions to Haskell to support concurrent
+and parallel programming. Let us first establish terminology:
+
+- *Parallelism* means running a Haskell program on multiple processors,
+ with the goal of improving performance. Ideally, this should be done
+ invisibly, and with no semantic changes.
+
+- *Concurrency* means implementing a program by using multiple
+ I/O-performing threads. While a concurrent Haskell program *can* run
+ on a parallel machine, the primary goal of using concurrency is not
+ to gain performance, but rather because that is the simplest and most
+ direct way to write the program. Since the threads perform I/O, the
+ semantics of the program is necessarily non-deterministic.
+
+GHC supports both concurrency and parallelism.
+
+.. toctree::
+ :maxdepth: 1
+
+ concurrent
+ stm
+ static_pointers