Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3ed4114f
Commit
3ed4114f
authored
Oct 15, 2010
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#9801: document how list and dict proxies created by Managers behave w.r.t. mutable items.
parent
c1c4bf85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
Doc/library/multiprocessing.rst
Doc/library/multiprocessing.rst
+18
-0
No files found.
Doc/library/multiprocessing.rst
View file @
3ed4114f
...
...
@@ -1284,6 +1284,24 @@ their parent process exits. The manager classes are defined in the
Create
a
shared
``
list
``
object
and
return
a
proxy
for
it
.
..
note
::
Modifications
to
mutable
values
or
items
in
dict
and
list
proxies
will
not
be
propagated
through
the
manager
,
because
the
proxy
has
no
way
of
knowing
when
its
values
or
items
are
modified
.
To
modify
such
an
item
,
you
can
re
-
assign
the
modified
object
to
the
container
proxy
::
#
create
a
list
proxy
and
append
a
mutable
object
(
a
dictionary
)
lproxy
=
manager
.
list
()
lproxy
.
append
({})
#
now
mutate
the
dictionary
d
=
lproxy
[
0
]
d
[
'a'
]
=
1
d
[
'b'
]
=
2
#
at
this
point
,
the
changes
to
d
are
not
yet
synced
,
but
by
#
reassigning
the
dictionary
,
the
proxy
is
notified
of
the
change
lproxy
[
0
]
=
d
Namespace
objects
>>>>>>>>>>>>>>>>>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment