summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--doc/manual.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/manual.rst b/doc/manual.rst
index 3a4dc77d8..d1fa1ba07 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -6371,12 +6371,18 @@ is uncertain (it may be removed any time).
 Example:
 
 .. code-block:: nim
+  import threadpool
   {.experimental: "parallel".}
 
+  proc threadedEcho(s: string, i: int) =
+    echo(s, " ", $i)
+
   proc useParallel() =
     parallel:
       for i in 0..4:
-        echo "echo in parallel"
+        spawn threadedEcho("echo in parallel", i)
+
+  useParallel()
 
 
 As a top level statement, the experimental pragma enables a feature for the