class ThreadChecker

Defined at line 28 of file ../../src/media/audio/services/common/thread_checker.h

A class to validate that operations happen on a specific thread.

This is like fit::thread_checker, with three differences:

1. The id is optional. If not specified, the calling code is allowed

to run on any thread.

2. Checks are always on, while fit::thread_checker disables checks

in release builds.

3. Scoped capabilities are supported via the ScopedThreadChecker

class, rather than std::lock_guard().

Public Methods

void ThreadChecker (std::optional<std::thread::id> id)

Defined at line 30 of file ../../src/media/audio/services/common/thread_checker.h

bool IsValid ()

Reports whether we are running on the correct thread.

Defined at line 33 of file ../../src/media/audio/services/common/thread_checker.h

void Check ()

Crashes if not running on the correct thread.

Defined at line 36 of file ../../src/media/audio/services/common/thread_checker.h

Friends

class ScopedThreadChecker