From 83c89197f3fda783819cd0c5de06561c3e6f3616 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 14 Aug 2018 01:28:04 +0200 Subject: renames threadpool.await to blockUntil; refs #7853 --- doc/manual.rst | 6 +++--- doc/spawn.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/manual.rst b/doc/manual.rst index ea2b74a75..db610f8f8 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -7877,7 +7877,7 @@ that ``spawn`` takes is restricted: ``spawn`` 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 +with the ``^`` operator is **blocking**. However, one can use ``blockUntilAny`` to wait on multiple flow variables at the same time: .. code-block:: nim @@ -7888,10 +7888,10 @@ wait on multiple flow 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 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 -- cgit 1.4.1-2-gfad0 ecurity.md
blob: e8d31b1b937ff393dbb6c571b4ab38872fd87107 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14