+doc #17337: Document composability and modularity
This commit is contained in:
parent
6b4f52afb2
commit
f330e61a05
18 changed files with 7331 additions and 4 deletions
|
|
@ -330,11 +330,11 @@ All of the above custom stages (linear or graph) provide a few simple guarantees
|
|||
- The state encapsulated by these classes can be safely modified from the provided callbacks, without any further
|
||||
synchronization.
|
||||
|
||||
In essence, the above guarantees are similar to what :class:`Actor`s provide, if one thinks of the state of a custom
|
||||
In essence, the above guarantees are similar to what :class:`Actor` s provide, if one thinks of the state of a custom
|
||||
stage as state of an actor, and the callbacks as the ``receive`` block of the actor.
|
||||
|
||||
.. warning::
|
||||
It is **not safe** to access the state of any custom stage outside of the callbacks that it provides, just like it
|
||||
It is **not safe** to access the state of any custom stage outside of the callbacks that it provides, just like it
|
||||
is unsafe to access the state of an actor from the outside. This means that Future callbacks should **not close over**
|
||||
internal state of custom stages because such access can be concurrent with the provided callbacks, leading to undefined
|
||||
behavior.
|
||||
Loading…
Add table
Add a link
Reference in a new issue