Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Defer and fix detection of 'missing Done' for Defer in Defer
Refactor Defer to make clearer that running the defered function is just delegated to Cleanup. The 'Done called' hook is now installed in its own Cleanup. Note that the panic about missing Done call will now also happen after the run of the last deferred function. Also it will be correctly installed multiple times for the weired case where Defer() is called from a deferred function.
- Loading branch information