add NullMessage after Supervise to prevent race, see #2418
- parent just checked for system messages and finds none - Supervise is enqueued to parent - Failed is enqueued to the parent - Failed is processed before Supervise and thus dropped due to non-matching UID remedy is to enqueue NullMessage after enqueuing Supervise but before really starting the actor, so that if NullMessage overtakes Supervise the loop in processMailbox will then pick up Supervise next
This commit is contained in:
parent
f7a39d50f4
commit
f0c370cf87
4 changed files with 12 additions and 2 deletions
|
|
@ -37,6 +37,13 @@ object Envelope {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This message is sent directly after the Supervise system message in order
|
||||
* to form a barrier wrt. the first real message sent by the child, so that e.g.
|
||||
* Failed() cannot overtake Supervise(). Processing this does nothing.
|
||||
*/
|
||||
case object NullMessage extends AutoReceivedMessage
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue