Qore Programming Language 0.8.8

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | List of all members
ThreadCleanupList Class Reference

list of functions to be run when a thread ends; required for some external libraries that require explicit cleanup when a thread terminates More...

`#include <qore_thread.h>`

## Public Member Functions
DLLEXPORT void | pop (bool exec=true)
| must only be called in the module destructor/deletion function More...
DLLEXPORT void | push (qtdest_t func, void *arg)
| must only be called in the module initialization function More...

## Detailed Description

list of functions to be run when a thread ends; required for some external libraries that require explicit cleanup when a thread terminates

this list is not locked and therefore the ThreadCleanupList::push() and ThreadCleanupList::pop() functions must only be called in module initialization and module deletion. However this list is implemented in such a way that thread cleanup list execution may be safely called interally while push() is being executed in a module initialization function, for example.

Note
  this is a global object and not an attribute of a thread

## Member Function Documentation

DLLEXPORT void ThreadCleanupList::pop | ( | bool | exec = `true` | ) |

must only be called in the module destructor/deletion function

Parameters

  exec | if true the cleanup function will be executed immediately, if false it will not

DLLEXPORT void ThreadCleanupList::push | ( | qtdest_t | func,
|  | void * | arg
| ) |  |

must only be called in the module initialization function

Parameters

  func | the cleanup function to be run whenever a thread ends
  arg | the argument to the function (can be 0)

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

- include/qore/qore_thread.h (6086)