-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Currently, a failure in PythonActor.__init__ results in delayed exception propagation: the next call to the actor will propagate the exception. This is because: 1) __init__ is treated like a normal message; and 2) we implement synchronous actor spawning by way of chaining subsequent (async) operations, which propagates antecedent failures down the operation sequence.
Initialization failures are special because the actor is by definition broken if we cannot complete the call to __init__. We should treat this as a supervision failure, and use that path instead. This will both improve localization of the error, but also cover a broader set of usage. For example, a client might spawn an actor with the expectation that it performs asynchronous work. It might even pass a port in its initializer to communicate results, etc.