Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

thread_creator Class Reference

creator for pool More...

#include <thread.h>

Inheritance diagram for thread_creator:

proto_creator< thread_creator, thread, job_task >

List of all members.

Static Public Member Functions

static threadcreate (const job_task &task)
 creates a new thread object
static void activate (thread *obj, const job_task &task)
 starts thread and assign task if any
static void back (thread *obj, const job_task &task)
 cancels task if any
static void destroy (thread *obj, const job_task &task)
 closes thread and destroy thread object
static void deactivate (thread *obj, const job_task &task)
 stops thread


Detailed Description

creator for pool

Definition at line 182 of file thread.h.


Member Function Documentation

thread * thread_creator::create ( const job_task task  )  [static]

creates a new thread object

Parameters:
task  create new thread object

Reimplemented from proto_creator< thread_creator, thread, job_task >.

Definition at line 329 of file thread.cpp.

References thread::start().

void thread_creator::activate ( thread obj,
const job_task task 
) [static]

starts thread and assign task if any

Parameters:
obj  thread object
task  task

Reimplemented from proto_creator< thread_creator, thread, job_task >.

Definition at line 339 of file thread.cpp.

References thread::assign_job(), thread::get_state(), thread::start(), and THREAD_CLOSE.

void thread_creator::back ( thread obj,
const job_task task 
) [static]

cancels task if any

Parameters:
obj  thread object
task  task

Reimplemented from proto_creator< thread_creator, thread, job_task >.

Definition at line 349 of file thread.cpp.

References thread::cancel_job().

Referenced by deactivate().

void thread_creator::destroy ( thread obj,
const job_task task 
) [static]

closes thread and destroy thread object

Parameters:
obj  thread object
task  task

Reimplemented from proto_creator< thread_creator, thread, job_task >.

Definition at line 356 of file thread.cpp.

References deactivate().

void thread_creator::deactivate ( thread obj,
const job_task task 
) [static]

stops thread

Parameters:
obj  thread object
task  task

Reimplemented from proto_creator< thread_creator, thread, job_task >.

Definition at line 364 of file thread.cpp.

References back(), and thread::stop().

Referenced by destroy().


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


© Copyright Terimber 2003-.