diff options
author | Araq <rumpf_a@web.de> | 2018-08-14 01:28:04 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-08-14 01:28:04 +0200 |
commit | 83c89197f3fda783819cd0c5de06561c3e6f3616 (patch) | |
tree | a20026b8c9064445119f92bc35f4c85db66935d6 /doc/spawn.txt | |
parent | 741f95e2d63746af8542f4679656a6e345120265 (diff) | |
download | Nim-83c89197f3fda783819cd0c5de06561c3e6f3616.tar.gz |
renames threadpool.await to blockUntil; refs #7853
Diffstat (limited to 'doc/spawn.txt')
-rw-r--r-- | doc/spawn.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/spawn.txt b/doc/spawn.txt index 522c94464..ab667ff48 100644 --- a/doc/spawn.txt +++ b/doc/spawn.txt @@ -25,7 +25,7 @@ Spawn statement A standalone ``spawn`` statement is a simple construct. It executes the passed expression on the thread pool and returns a `data flow variable`:idx: ``FlowVar[T]`` that can be read from. The reading with the ``^`` operator is -**blocking**. However, one can use ``awaitAny`` to wait on multiple flow +**blocking**. However, one can use ``blockUntilAny`` to wait on multiple flow variables at the same time: .. code-block:: nim @@ -36,10 +36,10 @@ variables at the same time: var responses = newSeq[FlowVarBase](3) for i in 0..2: responses[i] = spawn tellServer(Update, "key", "value") - var index = awaitAny(responses) + var index = blockUntilAny(responses) assert index >= 0 responses.del(index) - discard awaitAny(responses) + discard blockUntilAny(responses) Data flow variables ensure that no data races are possible. Due to technical limitations not every type ``T`` is possible in |