cef_thread_t

A simple thread abstraction that establishes a message loop on a new thread. The consumer uses cef_task_runner_t to execute code on the thread's message loop. The thread is terminated when the cef_thread_t object is destroyed or stop() is called. All pending tasks queued on the thread's message loop will run to completion before the thread is terminated. cef_thread_create() can be called on any valid CEF thread in either the browser or render process. This structure should only be used for tasks that require a dedicated thread. In most cases you can post tasks to an existing CEF thread instead of creating a new one; see cef_task.h for details.

Members

Variables

base
cef_base_ref_counted_t base;

Base structure.

get_platform_thread_id
cef_platform_thread_id_t function(cef_thread_t* self) nothrow get_platform_thread_id;

Returns the platform thread ID. It will return the same value after stop() is called. This function is safe to call from any thread.

get_task_runner
cef_task_runner_t* function(cef_thread_t* self) nothrow get_task_runner;

message loop. This function is safe to call from any thread.

is_running
int function(cef_thread_t* self) nothrow is_running;

Returns true (1) if the thread is currently running. This function must be called from the same thread that called cef_thread_create().

stop
void function(cef_thread_t* self) nothrow stop;

Stop and join the thread. This function must be called from the same thread that called cef_thread_create(). Do not call this function if cef_thread_create() was called with a |stoppable| value of false (0).

Meta