crashpad::ScopedTaskSuspend Class Reference

Manages the suspension of another task. More...

`#include "util/mach/scoped_task_suspend.h"`

## Public Member Functions

| ScopedTaskSuspend (zx_handle_t task)
| ScopedTaskSuspend (task_t task)

## Detailed Description

Manages the suspension of another task.

The underlying API only supports suspending threads (despite its name) not entire tasks. As a result, it's possible some threads may not be correctly suspended/resumed as their creation might race enumeration.

Additionally, suspending a thread is asynchronous and may take an arbitrary amount of time.

Because of these limitations, this class is limited to being a best-effort, and correct suspension/resumption cannot be relied upon.

Callers should not attempt to suspend the current task as obtained via `zx_process_self()`.

While an object of this class exists, the other task will be suspended. Once the object is destroyed, the other task will become eligible for resumption. Note that suspensions are counted, and the task will not actually resume unless its suspend count drops to 0.

Callers should not attempt to suspend the current task (`mach_task_self()`).

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

- util/fuchsia/scoped_task_suspend.h
- util/fuchsia/scoped_task_suspend.cc