|
Qore Programming Language
0.8.3
|
#include <stdio.h>#include <pthread.h>Go to the source code of this file.
Classes | |
| class | ThreadCleanupList |
| list of functions to be run when a thread ends; required for some external libraries that require explicit cleanup when a thread terminates More... | |
Typedefs | |
| typedef void(* | qtdest_t )(void *) |
| pointer to a qore thread destructor function | |
| typedef void(* | qtrdest_t )(void *, ExceptionSink *) |
| pointer to a qore thread resource destructor function | |
Functions | |
| DLLEXPORT bool | is_valid_qore_thread () |
| returns true if the current thread is a valid qore thread; it is not safe to call most Qore functions unless the thread is registered with Qore | |
| DLLEXPORT int | gettid () |
| returns the current TID number | |
| DLLEXPORT QoreProgram * | getProgram () |
| returns the current QoreProgram | |
|
DLLEXPORT const AbstractQoreZoneInfo * | currentTZ () |
| returns the current local time zone, note that if 0 = UTC | |
| DLLEXPORT void | set_thread_resource (AbstractThreadResource *atr) |
| save a resource against a thread for thread resource handling | |
| DLLEXPORT int | remove_thread_resource (AbstractThreadResource *atr) |
| remove the resource from the thread resource list for the current thread | |
| DLLEXPORT void | set_thread_resource_id (q_trid_t trid, AbstractThreadResource *atr) |
| save a resource against a thread for thread resource handling using the thread resource id | |
| DLLEXPORT int | remove_thread_resource_id (q_trid_t trid) |
| remove the resource from the thread resource list for the current thread using the thread resource ID | |
| DLLEXPORT bool | check_thread_resource_id (q_trid_t trid) |
| check if a thread resouce has been saved with the given resource id | |
| DLLEXPORT q_trid_t | qore_get_trid () |
| get a thread resource ID | |
Variables | |
| DLLEXPORT ThreadCleanupList | tclist |
| the interface to the thread cleanup list | |
Provides definitions relative to threading in Qore.
| DLLEXPORT bool check_thread_resource_id | ( | q_trid_t | trid | ) |
check if a thread resouce has been saved with the given resource id
| trid | thread resource id to check |
| DLLEXPORT int remove_thread_resource | ( | AbstractThreadResource * | atr | ) |
remove the resource from the thread resource list for the current thread
| atr | a pointer to the thread resource to remove |
| DLLEXPORT int remove_thread_resource_id | ( | q_trid_t | trid | ) |
remove the resource from the thread resource list for the current thread using the thread resource ID
| trid | thread resource id of the resource to remove, must have been set with set_thread_resource_id() |
| DLLEXPORT void set_thread_resource | ( | AbstractThreadResource * | atr | ) |
save a resource against a thread for thread resource handling
| atr | a pointer to the thread resource to save |
| DLLEXPORT void set_thread_resource_id | ( | q_trid_t | trid, |
| AbstractThreadResource * | atr | ||
| ) |
save a resource against a thread for thread resource handling using the thread resource id
by using the thread resource id, you can quickly check if the resource has already been saved for the thread
| trid | thread resource id |
| atr | a pointer to the thread resource to save |