Skip to content

Commit ff0af80

Browse files
authored
doc: Manager pattern
some more thoughts
1 parent f915ef2 commit ff0af80

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

chapter14_leftover/readme.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ mediator pattern which handles interaction between related objects, the
77
manager pattern has the role of managing multiple identical or related objects.
88

99
For example in the Python standard library the [`Manager` object](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Manager)
10-
in the `multiprocessing` library manages shared objects between child
11-
processes.
10+
in the `multiprocessing` library manages shared objects and child processes.
11+
It keeps track of the running processes, shared objects and the available methods
12+
on those objects. Without a `Manager` object, multiple processes could try to access
13+
or modify shared objects at the same time with unpredictable results.
14+
It uses the `Proxy` design pattern, providing a proxy to the shared objects, to help
15+
achieve this, passing messages and data across process boundaries.

0 commit comments

Comments
 (0)