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:

## Public Member Functions
| PruneCrashReportThread (CrashReportDatabase *database, std::unique_ptr< PruneCondition > condition)
| Constructs a new object. More...
void | Start ()
| Starts a dedicated pruning thread. More...
void | Stop ()
| 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] | database | The database to prune crash reports from.
  [in] | condition | The condition used to evaluate crash reports for pruning.

## Member Function Documentation

## ◆ Start()

void crashpad::PruneCrashReportThread::Start | ( |  | ) |

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

## ◆ Stop()

void crashpad::PruneCrashReportThread::Stop | ( |  | ) |

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

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

- handler/prune_crash_reports_thread.h
- handler/prune_crash_reports_thread.cc