Typedefs | |
typedef struct axutil_thread_pool | axutil_thread_pool_t |
Functions | |
AXIS2_EXTERN axutil_thread_t * | axutil_thread_pool_get_thread (axutil_thread_pool_t *pool, axutil_thread_start_t func, void *data) |
AXIS2_EXTERN axis2_status_t | axutil_thread_pool_join_thread (axutil_thread_pool_t *pool, axutil_thread_t *thd) |
AXIS2_EXTERN axis2_status_t | axutil_thread_pool_exit_thread (axutil_thread_pool_t *pool, axutil_thread_t *thd) |
AXIS2_EXTERN axis2_status_t | axutil_thread_pool_thread_detach (axutil_thread_pool_t *pool, axutil_thread_t *thd) |
AXIS2_EXTERN void | axutil_thread_pool_free (axutil_thread_pool_t *pool) |
AXIS2_EXTERN axutil_thread_pool_t * | axutil_thread_pool_init (axutil_allocator_t *allocator) |
AXIS2_EXTERN struct axutil_env * | axutil_init_thread_env (const struct axutil_env *system_env) |
AXIS2_EXTERN void | axutil_free_thread_env (struct axutil_env *thread_env) |
AXIS2_EXTERN void axutil_free_thread_env | ( | struct axutil_env * | thread_env | ) |
This function can be used to free the environment that was used in a thread function
AXIS2_EXTERN struct axutil_env* axutil_init_thread_env | ( | const struct axutil_env * | system_env | ) | [read] |
This function can be used to initialize the environment in case of spawning a new thread via a thread function
AXIS2_EXTERN axis2_status_t axutil_thread_pool_exit_thread | ( | axutil_thread_pool_t * | pool, | |
axutil_thread_t * | thd | |||
) |
Stop the execution of current thread
thd | thread to be stopped |
AXIS2_EXTERN void axutil_thread_pool_free | ( | axutil_thread_pool_t * | pool | ) |
Frees resources used by thread_pool
pool | thread_pool to be freed |
AXIS2_EXTERN axutil_thread_t* axutil_thread_pool_get_thread | ( | axutil_thread_pool_t * | pool, | |
axutil_thread_start_t | func, | |||
void * | data | |||
) |
Retrives a thread from the thread pool
func | function to be executed in the new thread | |
data | arguments to be passed to the function |
AXIS2_EXTERN axutil_thread_pool_t* axutil_thread_pool_init | ( | axutil_allocator_t * | allocator | ) |
Initializes (creates) an thread_pool.
allocator | user defined allocator for the memory allocation. |
AXIS2_EXTERN axis2_status_t axutil_thread_pool_join_thread | ( | axutil_thread_pool_t * | pool, | |
axutil_thread_t * | thd | |||
) |
Blocks until the desired thread stops executing.
thd | The thread to joined |
AXIS2_EXTERN axis2_status_t axutil_thread_pool_thread_detach | ( | axutil_thread_pool_t * | pool, | |
axutil_thread_t * | thd | |||
) |
Detaches a thread
thd | thread to be detached |