All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QoreForeignThreadHelper Class Reference

use this class to temporarily register and deregister a foreign thread to allow Qore code to be executed and the Qore library to be used from threads not created by the Qore library More...

`#include <qore_thread.h>`

## Public Member Functions

DLLEXPORT | QoreForeignThreadHelper ()
| registers the current thread as a foreign thread; the thread will be deregistered with q_deregister_foreign_thread() in the destructor
DLLEXPORT | QoreForeignThreadHelper (int tid)
| registers the current thread as a foreign thread; the tid given must be already reserved with q_reserve_foreign_thread_id(); the thread will be deregistered with q_deregister_reserved_foreign_thread() in the destructor
DLLEXPORT | ~QoreForeignThreadHelper ()
| deregisters the current thread if the registration was successful using either q_deregister_foreign_thread() or q_reserve_foreign_thread_id(), depending on the constructor used

## Detailed Description

use this class to temporarily register and deregister a foreign thread to allow Qore code to be executed and the Qore library to be used from threads not created by the Qore library

Since
  Qore 0.8.7

The documentation for this class was generated from the following file:

- include/qore/qore_thread.h (6de6cc3b438610bf03b2bec44a3d7c61f90e3165)