pub type cef_thread_t = _cef_thread_t;Expand description
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.
NOTE: This struct is allocated DLL-side.
Aliased Type§
#[repr(C)]pub struct cef_thread_t {
pub base: _cef_base_ref_counted_t,
pub get_task_runner: Option<unsafe extern "C" fn(*mut _cef_thread_t) -> *mut _cef_task_runner_t>,
pub get_platform_thread_id: Option<unsafe extern "C" fn(*mut _cef_thread_t) -> i32>,
pub stop: Option<unsafe extern "C" fn(*mut _cef_thread_t)>,
pub is_running: Option<unsafe extern "C" fn(*mut _cef_thread_t) -> i32>,
}Fields§
§base: _cef_base_ref_counted_tBase structure.
get_task_runner: Option<unsafe extern "C" fn(*mut _cef_thread_t) -> *mut _cef_task_runner_t>Returns the cef_task_runner_t that will execute code on this thread’s message loop. This function is safe to call from any thread.
get_platform_thread_id: Option<unsafe extern "C" fn(*mut _cef_thread_t) -> i32>Returns the platform thread ID. It will return the same value after stop() is called. This function is safe to call from any thread.
stop: Option<unsafe extern "C" fn(*mut _cef_thread_t)>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).
is_running: Option<unsafe extern "C" fn(*mut _cef_thread_t) -> i32>Returns true (1) if the thread is currently running. This function must be called from the same thread that called cef_thread_create().