Base class for structured async cleanup.
Declared in <folly/futures/Cleanup.h>
class Cleanup;
This implementation is a base class that collects a set of cleanup tasks and runs them in reverse order.
A class derived from Cleanup
only allows cleanup to be run once
is required to complete cleanup before running the destructor
should not run cleanup tasks. Running the cleanup task should be delegated to the owner of the derived class
should not be owned by a shared_ptr. Cleanup is intended to remove shared ownership.
| Name | Description |
|---|---|
Cleanup [constructor] | Constructs a Cleanup with an empty set of cleanup tasks. |
~Cleanup [destructor] | Destroys the Cleanup, requiring that cleanup() has already completed. |
cleanup | Runs the accumulated cleanup tasks in reverse of the order they were added. |
| Name | Description |
|---|---|
addCleanup | addCleanup overloads |