Crashpad
|
A thread that periodically prunes crash reports from the database using the specified condition. More...
#include "handler/prune_crash_reports_thread.h"
Public Member Functions | |
PruneCrashReportThread (CrashReportDatabase *database, std::unique_ptr< PruneCondition > condition) | |
Constructs a new object. More... | |
void | Start () override |
Starts a dedicated pruning thread. More... | |
void | Stop () override |
Stops the pruning thread. More... | |
A thread that periodically prunes crash reports from the database using the specified condition.
After the thread is started, the database is pruned using the condition every 24 hours. Upon calling Start(), the thread waits 10 minutes before performing the initial prune operation.
crashpad::PruneCrashReportThread::PruneCrashReportThread | ( | CrashReportDatabase * | database, |
std::unique_ptr< PruneCondition > | condition | ||
) |
Constructs a new object.
[in] | database | The database to prune crash reports from. |
[in] | condition | The condition used to evaluate crash reports for pruning. |
|
overridevirtual |
Starts a dedicated pruning thread.
The thread waits before running the initial prune, so as to not interfere with any startup-related IO performed by the client.
This method may only be be called on a newly-constructed object or after a call to Stop().
Implements crashpad::Stoppable.
|
overridevirtual |
Stops the pruning thread.
This method must only be called after Start(). If Start() has been called, this method must be called before destroying an object of this class.
This method may be called from any thread other than the pruning thread. It is expected to only be called from the same thread that called Start().
Implements crashpad::Stoppable.