Skip to content

Commit b93b969

Browse files
committedDec 4, 2014
doc/pc_rpc: add warning about mutable types
1 parent 0447562 commit b93b969

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎artiq/management/pc_rpc.py

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
transparent and uses ``artiq.management.pyon`` internally so that e.g. Numpy
55
arrays can be easily used.
66
7+
Note that the server operates on copies of objects provided by the client,
8+
and modifications to mutable types are not written back. For example, if the
9+
client passes a list as a parameter of an RPC method, and that method
10+
``append()s`` an element to the list, the element is not appended to the
11+
client's list.
12+
713
"""
814

915
import socket

‎doc/manual/writing_a_driver.rst

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ Run it as before, while the controller is running. You should see the message ap
8383

8484
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.
8585

86+
: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.
87+
8688
Command-line arguments
8789
----------------------
8890

0 commit comments

Comments
 (0)
Please sign in to comment.