Skip to content

Commit

Permalink
doc/pc_rpc: add warning about mutable types
Browse files Browse the repository at this point in the history
sbourdeauducq committed Dec 4, 2014
1 parent 0447562 commit b93b969
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions artiq/management/pc_rpc.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,12 @@
transparent and uses ``artiq.management.pyon`` internally so that e.g. Numpy
arrays can be easily used.
Note that the server operates on copies of objects provided by the client,
and modifications to mutable types are not written back. For example, if the
client passes a list as a parameter of an RPC method, and that method
``append()s`` an element to the list, the element is not appended to the
client's list.
"""

import socket
2 changes: 2 additions & 0 deletions doc/manual/writing_a_driver.rst
Original file line number Diff line number Diff line change
@@ -83,6 +83,8 @@ Run it as before, while the controller is running. You should see the message ap

When using the driver in an experiment, for simple cases the ``Client`` instance can be returned by the :class:`artiq.language.core.AutoContext` mechanism and used normally as a device.

:warning: RPC servers operate on copies of objects provided by the client, and modifications to mutable types are not written back. For example, if the client passes a list as a parameter of an RPC method, and that method ``append()s`` an element to the list, the element is not appended to the client's list.

Command-line arguments
----------------------

0 comments on commit b93b969

Please sign in to comment.