* +doc,per #21689 document calling persist() in Future is unsafe * Update persistence.rst * Update persistence.rst
This commit is contained in:
parent
c3803d6edf
commit
385ea37497
2 changed files with 14 additions and 0 deletions
|
|
@ -326,6 +326,13 @@ In this case no stashing is happening, yet events are still persisted and callba
|
|||
While it is possible to nest mixed ``persist`` and ``persistAsync`` with keeping their respective semantics
|
||||
it is not a recommended practice, as it may lead to overly complex nesting.
|
||||
|
||||
.. warning::
|
||||
While it is possible to nest ``persist`` calls within one another,
|
||||
it is *not* legal call ``persist`` from any other Thread than the Actors message processing Thread.
|
||||
For example, it is not legal to call ``persist`` from Futures! Doing so will break the guarantees
|
||||
that the persist methods aim to provide. Always call ``persist`` and ``persistAsync`` from within
|
||||
the Actor's receive block (or methods synchronously invoked from there).
|
||||
|
||||
.. _failures-java:
|
||||
|
||||
Failures
|
||||
|
|
|
|||
|
|
@ -312,6 +312,13 @@ In this case no stashing is happening, yet events are still persisted and callba
|
|||
While it is possible to nest mixed ``persist`` and ``persistAsync`` with keeping their respective semantics
|
||||
it is not a recommended practice, as it may lead to overly complex nesting.
|
||||
|
||||
.. warning::
|
||||
While it is possible to nest ``persist`` calls within one another,
|
||||
it is *not* legal call ``persist`` from any other Thread than the Actors message processing Thread.
|
||||
For example, it is not legal to call ``persist`` from Futures! Doing so will break the guarantees
|
||||
that the persist methods aim to provide. Always call ``persist`` and ``persistAsync`` from within
|
||||
the Actor's receive block (or methods synchronously invoked from there).
|
||||
|
||||
.. _failures-scala:
|
||||
|
||||
Failures
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue