Earl::Aplication on-exit behavior
On exit, Earl::Application calls terminate on all agents in the supervision tree, but does not wait for them to transition from stopping to stopped or crashed state. This leaves no time for agents to gracefully stop, should Earl::Application wait for itself to transition to stopped? Perhaps with a short timeout to terminate anyway.
Yes, exiting is still bad.
Alternatively, Supervisor and Pool could prevent the agents they spawn to outlive them? With Application eventually exiting anyway after a graceful time —or a second or third SIGINT is received.
@ysbaddaden I agree with supervisors's children shouldn't outlive their parents. Reading the supervisor code, I think this is already handled well with the @done channel. The only missing piece is for Application to wait for call to exit.
I think application should have a graceful timeout and immediate exit on second SIGINT.