main_thread_callback_manager Class Reference

#include <main_thread_callback.h>

Inheritance diagram for main_thread_callback_manager:
service_base

List of all members.

Public Types

typedef
main_thread_callback_manager 
t_interface_entrypoint
typedef
main_thread_callback_manager 
t_interface
typedef service_base t_interface_parent

Public Member Functions

virtual void add_callback (service_ptr_t< main_thread_callback > p_callback)=0
 Queues a callback object. This can be called from any thread, implementation ensures multithread safety. Implementation will call p_callback->callback_run() once later. To get it called repeatedly, you would need to add your callback again.

Static Public Attributes

static const GUID class_guid

Detailed Description

Allows you to queue a callback object to be called from main app thread. This is commonly used to trigger main-thread-only API calls from worker threads.
This can be also used from main app thread, to avoid race conditions when trying to use APIs that dispatch global callbacks from inside some other global callback, or using message loops / modal dialogs inside global callbacks.


Member Typedef Documentation

Reimplemented from service_base.


Member Function Documentation

virtual void main_thread_callback_manager::add_callback ( service_ptr_t< main_thread_callback p_callback  )  [pure virtual]

Queues a callback object. This can be called from any thread, implementation ensures multithread safety. Implementation will call p_callback->callback_run() once later. To get it called repeatedly, you would need to add your callback again.


Member Data Documentation

Initial value:
 
{ 0x1131d64b, 0x4cb, 0x43ee, { 0x95, 0xeb, 0x24, 0xd1, 0x8b, 0x75, 0x32, 0x48 } }

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by  doxygen 1.6.2