Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
amitmurthy committed Jul 26, 2015
1 parent c81c8ea commit bbbd932
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 6 additions & 4 deletions doc/manual/parallel-computing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,14 @@ holding objects of type ``T``. Multiple readers can read off the channel
via ``fetch`` and ``take!``. Multiple writers can add to the channel via
``put!``. ``isready`` tests for the prescence of any object in
the channel, while ``wait`` waits for an object to become available.
``close`` closes a Channel. On a closed channel, ``put!`` will fail,
while ``take!`` and ``fetch`` successfully return any existing values
till it is emptied.

A Channel can be used as an iterable object in a ``for`` loop, in which
case the loop runs till the channel is open. The loop variable takes on
all values added to the channel. ``close`` closes a Channel causing
the loop to terminate.

case the loop runs as long as the channel has data or is open. The loop
variable takes on all values added to the channel. An empty, closed channel
causes the ``for`` loop to terminate.


Shared Arrays (Experimental)
Expand Down
8 changes: 8 additions & 0 deletions doc/stdlib/parallel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,14 @@ General Parallel Computing Support
@async put!(rr, remotecall_fetch(p, long_computation))
isready(rr) # will not block

.. function:: close(Channel)

Closes a channel. An exception is thrown by:

* ``put!`` on a on a closed channel.

* ``take!`` and ``fetch`` on an empty, closed channel.

.. function:: RemoteRef()

Make an uninitialized remote reference on the local machine.
Expand Down

0 comments on commit bbbd932

Please sign in to comment.