Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefTaskRunner

CefBaseRefCounted
   |
   +--CefTaskRunner

   in cef_task.h

class CefTaskRunner
extends CefBaseRefCounted

Class that asynchronously executes tasks on the associated thread. It is safe to call the methods of this class 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).


Method Summary
 virtual bool BelongsToCurrentThread()= 0
          Returns true if this task runner belongs to the current thread.
 virtual bool BelongsToThread( CefThreadId threadId )= 0
          Returns true if this task runner is for the specified CEF thread.
 static CefRefPtr< CefTaskRunner > GetForCurrentThread()
          Returns the task runner for the current thread.
 static CefRefPtr< CefTaskRunner > GetForThread( CefThreadId threadId )
          Returns the task runner for the specified CEF thread.
 virtual bool IsSame( CefRefPtr< CefTaskRunner > that )= 0
          Returns true if this object is pointing to the same task runner as |that| object.
 virtual bool PostDelayedTask( CefRefPtr< CefTask > task, int64 delay_ms )= 0
          Post a task for delayed execution on the thread associated with this task runner.
 virtual bool PostTask( CefRefPtr< CefTask > task )= 0
          Post a task for execution on the thread associated with this task runner.
   
Methods inherited from class CefBaseRefCounted
AddRef, Release, HasOneRef, HasAtLeastOneRef
 

Method Detail

BelongsToCurrentThread

public virtual bool BelongsToCurrentThread()= 0;
Returns true if this task runner belongs to the current thread.

BelongsToThread

public virtual bool BelongsToThread( CefThreadId threadId )= 0;
Returns true if this task runner is for the specified CEF thread.

GetForCurrentThread

public static CefRefPtr< CefTaskRunner > GetForCurrentThread();
Returns the task runner for the current thread. Only CEF threads will have task runners. An empty reference will be returned if this method is called on an invalid thread.

GetForThread

public static CefRefPtr< CefTaskRunner > GetForThread( CefThreadId threadId );
Returns the task runner for the specified CEF thread.

IsSame

public virtual bool IsSame( CefRefPtr< CefTaskRunner > that )= 0;
Returns true if this object is pointing to the same task runner as |that| object.

PostDelayedTask

public virtual bool PostDelayedTask( CefRefPtr< CefTask > task, int64 delay_ms )= 0;
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.

PostTask

public virtual bool PostTask( CefRefPtr< CefTask > task )= 0;
Post a task for execution on the thread associated with this task runner. Execution will occur asynchronously.

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2016 Marshall A. Greenblatt