Crashpad
Public Member Functions | List of all members
crashpad::PruneCrashReportThread Class Reference

A thread that periodically prunes crash reports from the database using the specified condition. More...

#include "handler/prune_crash_reports_thread.h"

Inheritance diagram for crashpad::PruneCrashReportThread:
crashpad::WorkerThread::Delegate crashpad::Stoppable

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PruneCrashReportThread()

crashpad::PruneCrashReportThread::PruneCrashReportThread ( CrashReportDatabase database,
std::unique_ptr< PruneCondition condition 
)

Constructs a new object.

Parameters
[in]databaseThe database to prune crash reports from.
[in]conditionThe condition used to evaluate crash reports for pruning.

Member Function Documentation

◆ Start()

void crashpad::PruneCrashReportThread::Start ( )
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.

◆ Stop()

void crashpad::PruneCrashReportThread::Stop ( )
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.


The documentation for this class was generated from the following files: