Project: mesos
Issue MESOS-5638: Check all omissions of 'defer' for safety
When registering callbacks with {{.then}}, {{.onAny}}, etc., we sometimes omit {{defer()}} in cases where it's deemed safe; for example, when the callback uses no process state and thus could be executed in an arbitrary context. Because of recent bugs due to the unsafe omission of {{defer()}}, we should do a sweep of the codebase for all such occurrences and evaluate their safety. We should also consider using {{defer()}} consistently in all such cases, as our [documentation|https://github.com/apache/mesos/tree/master/3rdparty/libprocess#defer] recommends.
Story points: 5