Add mechanism to let supervisor react to restart in custom fashion
Currently the Exit message is swallowed by self.handleTrapExit, which is not customizable beyond OneForOne or AllForOne strategies. It would be quite useful to add a hook/message so that the actual supervisor actor gets a chance to run some code in response to a restart.
Update
Add lifecycle observer functionality, e.g.
It might make sense to implicitly make supervisors also lifecycle observers, but then it should not be an error if they do not handle the corresponding messages, otherwise we break too much code.
Update
Add lifecycle observer functionality, e.g.
actorA observe actorB
, which will notify actorA
of start/restart/stop of actorB
. Supervisors should directly receive the restart notification after handling the Exit
message, if they are also observers.It might make sense to implicitly make supervisors also lifecycle observers, but then it should not be an error if they do not handle the corresponding messages, otherwise we break too much code.
Leave a comment
on 2011-10-04 03:51 *
By viktorklang
Assigned to changed from rkuhn to viktorklang
Status changed from New to Fixed
Updating tickets (#818, #821, #823, #836, #842, #854, #856, #865, #866, #867, #868, #869, #871, #872, #873, #877, #878, #879, #885, #888, #889, #890, #894, #910, #911, #917, #923, #924, #925, #926, #927, #928, #930, #931, #932, #933, #934, #936, #937, #952, #955, #957, #958, #959, #960, #961, #964, #965, #966)