#include <main_thread_callback.h>
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 |
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.
Reimplemented from service_base.
| 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.
const GUID main_thread_callback_manager::class_guid [static] |
{ 0x1131d64b, 0x4cb, 0x43ee, { 0x95, 0xeb, 0x24, 0xd1, 0x8b, 0x75, 0x32, 0x48 } }
1.6.2