class GlobalTaskQueue

Defined at line 27 of file ../../src/media/audio/services/mixer/common/global_task_queue.h

A queue of pending tasks.

The queue has two important properties:

1. Tasks must execute in the order they are pushed.

2. Tasks must execute on specific threads.

This class is thread safe.

Public Methods

void Push (ThreadId id, fit::closure fn)

Pushes a task onto the end of the queue.

The task must execute on thread `id`, unless `id = kAnyThreadId`,

in which case the task may execute on any thread.

Defined at line 11 of file ../../src/media/audio/services/mixer/common/global_task_queue.cc

void GlobalTaskQueue ()

Defined at line 29 of file ../../src/media/audio/services/mixer/common/global_task_queue.h

void GlobalTaskQueue (const GlobalTaskQueue & )

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

void RunForThread (ThreadId id)

Runs all tasks that can be processed by the given thread.

If `id != kAnyThreadId`, then this must be called from the correct thread.

If `id == kAnyThreadId`, then this may be called from any thread.

Defined at line 30 of file ../../src/media/audio/services/mixer/common/global_task_queue.cc

GlobalTaskQueue & operator= (const GlobalTaskQueue & )

Defined at line 31 of file ../../src/media/audio/services/mixer/common/global_task_queue.h

void GlobalTaskQueue (GlobalTaskQueue && )

Defined at line 32 of file ../../src/media/audio/services/mixer/common/global_task_queue.h

GlobalTaskQueue & operator= (GlobalTaskQueue && )

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

void RegisterTimer (ThreadId id, std::shared_ptr<Timer> timer)

Registers a Timer to be notified via SetEventBit when thread `id` is ready to run.

There can be at most one Timer registered per `id`.

Defined at line 78 of file ../../src/media/audio/services/mixer/common/global_task_queue.cc

void UnregisterTimer (ThreadId id)

Discards a previously-registered Timer.

Defined at line 85 of file ../../src/media/audio/services/mixer/common/global_task_queue.cc