[][src]Crate tokio_evacuate

tokio-evacuate provides a way to safely "evacuate" users of a resource before forcefully removing them.

In many networked applications, there comes a time when the server must shutdown or reload, and may still be actively serving traffic. Listeners or publishers can be shut down, and remaining work can be processed while no new work is allowed.. but this may take longer than the operator is comfortable with.

Evacuate is a middleware future, that works in conjuction with a classic "shutdown signal." By combining a way to track the number of current users, as well as a way to fire a global timeout, we allow applications to provide soft shutdown capabilities, giving work a chance to complete, before forcefully stopping computation.

tokio-evacuate depends on Tokio facilities, and so will not work on other futures executors.



A future for safely "evacuating" a resource that is used by multiple parties.


Dispatcher for user count updates.