#[repr(C)]pub struct _cef_task_runner_t {
pub base: cef_base_ref_counted_t,
pub is_same: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t, that: *mut _cef_task_runner_t) -> c_int>,
pub belongs_to_current_thread: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t) -> c_int>,
pub belongs_to_thread: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t, threadId: cef_thread_id_t) -> c_int>,
pub post_task: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t, task: *mut _cef_task_t) -> c_int>,
pub post_delayed_task: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t, task: *mut _cef_task_t, delay_ms: i64) -> c_int>,
}Expand description
Structure that asynchronously executes tasks on the associated thread. It is safe to call the functions of this structure on any thread.
CEF maintains multiple internal threads that are used for handling different types of tasks in different processes. The cef_thread_id_t definitions in cef_types.h list the common CEF threads. Task runners are also available for other CEF threads as appropriate (for example, V8 WebWorker threads).
NOTE: This struct is allocated DLL-side.
Fields§
§base: cef_base_ref_counted_tBase structure.
is_same: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t, that: *mut _cef_task_runner_t) -> c_int>Returns true (1) if this object is pointing to the same task runner as |that| object.
belongs_to_current_thread: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t) -> c_int>Returns true (1) if this task runner belongs to the current thread.
belongs_to_thread: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t, threadId: cef_thread_id_t) -> c_int>Returns true (1) if this task runner is for the specified CEF thread.
post_task: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t, task: *mut _cef_task_t) -> c_int>Post a task for execution on the thread associated with this task runner. Execution will occur asynchronously.
post_delayed_task: Option<unsafe extern "C" fn(self_: *mut _cef_task_runner_t, task: *mut _cef_task_t, delay_ms: i64) -> c_int>Post a task for delayed execution on the thread associated with this task runner. Execution will occur asynchronously. Delayed tasks are not supported on V8 WebWorker threads and will be executed without the specified delay.
Trait Implementations§
Source§impl Clone for _cef_task_runner_t
impl Clone for _cef_task_runner_t
Source§fn clone(&self) -> _cef_task_runner_t
fn clone(&self) -> _cef_task_runner_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more