group Thread Group

This group of functions provides a set of thread safe functions for managing and tracking running threads. They are mainly used to make sure that threads can validate the existence of other threads and so that the main process thread of a ferite script wont exit until all running threads have ceased execution.

group contents
Functions
function ferite_create_thread_group(FeriteScript) - Create a thread group structure
function ferite_thread_group_attach(FeriteScript,FeriteThreadGroup,FeriteThread) - Attach a given FeriteThread to a thread group.
function ferite_thread_group_destroy(FeriteScript,FeriteThreadGroup) - Destroy a thread group. This function blocks.
function ferite_thread_group_dettach(FeriteScript,FeriteThreadGroup,FeriteThread) - Dettach a given FeriteThread from a thread group.
function ferite_thread_group_wait(FeriteScript,FeriteThreadGroup) - Block the calling process until all threads within the group have dettached.

Functions

function ferite_create_thread_group Click to go up to the list
Create a thread group structure
Declaration:
    FeriteThreadGroup *ferite_create_thread_group( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script context
Returns:
    A pointer to a FeriteThreadGroup structure on success, NULL otherwise

function ferite_thread_group_attach Click to go up to the list
Attach a given FeriteThread to a thread group.
Declaration:
    void ferite_thread_group_attach( FeriteScript *script, FeriteThreadGroup *group, FeriteThread *thread )
Parameters:
    Parameter #1: FeriteScript *script - The script context
    Parameter #2: FeriteThreadGroup *group - The thread group to attach to
    Parameter #3: FeriteThread *thread - The thread to attach

function ferite_thread_group_destroy Click to go up to the list
Destroy a thread group. This function blocks.
Warning!
This function will block the calling thread/process until all threads within the group have dettached from the group/
Declaration:
    void ferite_thread_group_destroy( FeriteScript *script, FeriteThreadGroup *group )
Parameters:
    Parameter #1: FeriteScript *script - The script context
    Parameter #2: FeriteThreadGroup *group - The thread group to cleanup

function ferite_thread_group_dettach Click to go up to the list
Dettach a given FeriteThread from a thread group.
Declaration:
    void ferite_thread_group_dettach( FeriteScript *script, FeriteThreadGroup *group, FeriteThread *thread )
Parameters:
    Parameter #1: FeriteScript *script - The script context
    Parameter #2: FeriteThreadGroup *group - The thread group to dettach from
    Parameter #3: FeriteThread *thread - The thread to dettach

function ferite_thread_group_wait Click to go up to the list
Block the calling process until all threads within the group have dettached.
Declaration:
    void ferite_thread_group_wait( FeriteScript *script, FeriteThreadGroup *group )
Parameters:
    Parameter #1: FeriteScript *script - The script context
    Parameter #2: FeriteThreadGroup *group - The group to wait on

Automatically generated at 12:07PM, Wednesday 25 May 2005 by feritedoc.