From 7c27f80c0b55188d9d93951548da2b0a6b3a417a Mon Sep 17 00:00:00 2001 From: Jeremiah Corrado Date: Thu, 7 Mar 2024 15:26:47 -0700 Subject: [PATCH] random module doc improvements Signed-off-by: Jeremiah Corrado --- modules/standard/Random.chpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/standard/Random.chpl b/modules/standard/Random.chpl index 638937a6a559..8ad8086c2828 100644 --- a/modules/standard/Random.chpl +++ b/modules/standard/Random.chpl @@ -25,7 +25,7 @@ conceptual stream of random numbers of a particular scalar type. Individual numbers can be generated with :proc:`randomStream.next`, or an iterable sequence of numbers can be generated by providing a domain argument to - ``next``. The stream's position in it's sequence can be updated with + ``next``. The stream's position in its sequence can be updated with :proc:`randomStream.skipTo`. Additionally, there are several methods for generating random numbers from arrays, domains, and ranges. @@ -665,8 +665,8 @@ module Random { Although parallel iteration is supported, the type itself is not thread-safe. In particular, it is not safe to call methods such as - :proc:`next` or :proc:`fill` on a ``randomStream`` from multiple tasks - concurrently. When multiple tasks need to generate random numbers + :proc:`next` or :proc:`fill` on the same ``randomStream`` from multiple + tasks concurrently. When multiple tasks need to generate random numbers concurrently, a couple of approaches can be taken (other than using a parallel safe lock to protect the ``randomStream``): @@ -679,7 +679,7 @@ module Random { forall (r, a) in zip(rs.next(A.domain), A) do a = r; - * Create a random stream for each task: + * Create a random stream for each task using task-private variables: .. code-block:: chapel