Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_Thread

Thread Class
Contained in: global
Derived from: none
Derived by: none
Group: Core (System)

#include <ClanLib/core.h>

### public function member index:

### Construction:

``static` `CL_Thread`*` | `create` | `(`CL_Runnable`* `runnable`, `bool` `delete_runnable` = false)`;
``static` `CL_Thread`*` | `create` | `(`int` (*`func`)(`void`*), `void`* `value`)`;
`` | `CL_Thread` | `(`CL_Runnable`* `runnable`, `bool` `delete_runnable` = false)`;
`` | `CL_Thread` | `(`int` (*`func`)(`void`*), `void`* `value`)`;
`` | `CL_Thread` | `(`const` `CL_Thread`& `copy`)`;
`` | `CL_Thread` | `()`;
`` | `~CL_Thread` | `()`;

### Operations:

``CL_Thread`&` | `operator``=` | `(`const` `CL_Thread`& `copy`)`;
``void`` | `start` | `()`;
``void`` | `terminate` | `()`;
``void`` | `wait` | `()`;
``void`` | `set_priority` | `(`EThreadPriority` `priority`)`;

## Description:

## Function Member Descriptions:

CL_Thread::CL_Thread - Create a thread that uses the CL_Runnable callback interface.
`` `CL_Thread` `(`CL_Runnable`* `runnable`, `bool` `delete_runnable` = false)`;

CL_Thread::CL_Thread - Create a thread that calls the function specified, with the value specified.
`` `CL_Thread` `(`int` (*`func`)(`void`*), `void`* `value`)`;

CL_Thread::CL_Thread - Copy constructor.
`` `CL_Thread` `(`const` `CL_Thread`& `copy`)`;

CL_Thread::CL_Thread - Null thread.
`` `CL_Thread` `()`;

CL_Thread::create - Create a thread that uses the CL_Runnable callback interface.
Provided for ClanLib-0.4 backward compatibility.
``static` `CL_Thread`*` `create` `(`CL_Runnable`* `runnable`, `bool` `delete_runnable` = false)`;

> runnable - Class to call when thread is started.

CL_Thread::create - Create a thread that calls the function specified, with the value specified.
Provided for ClanLib-0.4 backward compatibility.
``static` `CL_Thread`*` `create` `(`int` (*`func`)(`void`*), `void`* `value`)`;

> func - Function that gets called at thread start.
> value - Value passed to the function at thread start.

CL_Thread::operator = - Copy assignement operator.
``CL_Thread`&` `operator``=` `(`const` `CL_Thread`& `copy`)`;

CL_Thread::set_priority - Set the thread priority.
``void`` `set_priority` `(`EThreadPriority` `priority`)`;

CL_Thread::start - Starts the thread.
``void`` `start` `()`;

CL_Thread::terminate - Terminate the thread. (use with caution under win98)
``void`` `terminate` `()`;

CL_Thread::wait - Wait until the thread finishes its execution.
``void`` `wait` `()`;

CL_Thread::~CL_Thread - Destructor.
`` `~CL_Thread` `()`;

## Variable Member Descriptions: